[SOLVED] I made sudo chmod -R ~/ by mystake

I cannot enter my system anymore. I confused the root directory with home.
Now when I try to enter into my system it complains. The KDE desktop doesn't fully load.
It creates a window where it says: Call to lnusertemp failed (temporary directory full?) Check your installation.
Is there anyway to fix it?
Last edited by doblerone (2014-03-18 08:52:49)

I try to fix it by making:
sudo chown david:users /home/david
I rebooted and at least the desktop loads with some problems still. It says in a lot of windows that it can't write into the configuration file : /home/david/.kde4........ Contact with your admin

Similar Messages

  • Sudo chmod

    Despite having admin rights, I can't execute a file that I need to (it's a Kyocera Permission fix for Kyocera printers running under 10/.6). I read that I can get Read/Write AND Execute rights to a file using the sudo command in the form sudo chmod 755 /path/to/command, run from terminal.
    Perhaps the reason I can't execute this file is because I have Read and Write but not Execute rights - trouble is I can't find anywhere 'normal' to assign the Execute rights.
    Any experience with the sudo command? The file is on my desktop so I have tried sudo chmod 755 /Users/coz/Desktop/OSX10.6 permissionfix/kyocera OS X 10.6 solution.command
    but I get:
    chmod: /Users/coz/Desktop/OSX10.6: No such file or directory
    chmod: permissionfix/kyocera: No such file or directory
    chmod: OS: No such file or directory
    chmod: X: No such file or directory
    chmod: 10.6: No such file or directory
    chmod: solution.command: No such file or directory
    Any thoughts on how I might word this sudo command to get the Execute rights?

    sudo chmod 755 /Users/coz/Desktop/OSX10.6 permissionfix/kyocera OS X 10.6 solution.command
    The problem with what you have typed is that it includes spaces, and spaces are the delimiters between parameters in a Unix command. It's reading what you wrote as a series of 6 files you're asking it to change. You can put a backslash ('\') before each space, include quotes around any filename that contains spaces, or best of all, just type the "sudo chmod 755 " part (noting the presence of a space at the end) and then drag the file onto the Terminal window to insert an appropriately-formatted path to it.
    All that said, I don't know that I'd recommend monkeying with permissions on that item... I'd recommend contacting Kyocera support and asking them about the problem. They may come back and say to do exactly what you're trying to do, but they may also say something like that you shouldn't use that item and that there's a newer version.

  • Sudo chmod -R 770 ~

    When using either sudo chmod -R 770 ~ or sudo chmod -R ug+rwX /Users/User, the permissions on my home folder change to include wheel read/write permissions. How and why is wheel showing up?

    xnav wrote:
    If you are doing this on the home folder why would you need 'sudo'?
    That has nothing to do with my question. (?)
    During the process of trying to import and get some old SSH keys working correctly I accidently changed the permissions on my home directory. There are several symptoms you'll see if the permissions are wrong in your user folder such as:
    If you're browsing to your home folder using Finder and get a message like 'The folder "username" could not be opened because you do not have sufficent access privileges'
    When trying to access your home folder in a terminal, you keep getting redirected back to /
    If you can't access your home directory in Mac OS it makes sense to do it the way I have.
    Now that we have that out of the way - why is wheel present?
    Thanks.

  • How to run "sudo chmod" Folder Action?

    My MacPro has a dedicated drive for photos taken by myself and my wife on our respective iPhones. However when I download photos from my iPhone then my wife cannot access them due to limited privileges. The solution is to chmod the files to 755. So I made a Folder Action with the following Run Shell Script
    chmod -R 755 /Volumes/DATA/Camera\ Pictures
    It works on my photos however it does not work on the photos that my wife uploads to the shared drive since I am not the owner of her iPhone photos. So I need to run the sudo command however I am unable to code an Automator Folder Action to accomplish this because it results in error with or without the sudo command in front of the chmod command. Could somebody assist?

    I appreciate your assistance Niel. Here is my Run Applescript text:
    on run {input, parameters}
      do shell script "chmod -R 755 '/Volumes/DATA/Camera\ Pictures/PHOTO\ VAULT/Photos\ per\ annum '" with administrator privileges
      return input
    end run
    I included the full path this time. I receive Syntax Error [Expected """ but found unknown token].

  • [SOLVED] alias with sudo: Password request malfunction

    Okay so here are two cool little system-maintenance related aliases, as suggested by "pacman tips" Wiki:
    Show dirs not owned by any package:
    alias pacman-disowned-dirs="comm -23 <(sudo find / \( -path '/dev' -o -path '/sys' -o -path '/run' -o -path '/tmp' -o -path '/mnt' -o -path '/srv' -o -path '/proc' -o -path '/boot' -o -path '/home' -o -path '/root' -o -path '/media' -o -path '/var/lib/pacman' -o -path '/var/cache/pacman' \) -prune -o -type d -print | sed 's/\([^/]\)$/\1\//' | sort -u) <(pacman -Qlq | sort -u)"
    Show files not owned by any package:
    alias pacman-disowned-files="comm -23 <(sudo find / \( -path '/dev' -o -path '/sys' -o -path '/run' -o -path '/tmp' -o -path '/mnt' -o -path '/srv' -o -path '/proc' -o -path '/boot' -o -path '/home' -o -path '/root' -o -path '/media' -o -path '/var/lib/pacman' -o -path '/var/cache/pacman' \) -prune -o -type f -print | sort -u) <(pacman -Qlq | sort -u)"
    typically I edit those into my "/etc/bash.bashrc" instead of "~/.bashrc", but there's no difference there. The thing is, when I invoke this alias,
    as regular user, it promptly requests [sudo] password, as it should, but after a brief moment the console returns to normal, there's no time for to even input the password, like this:
    [danilo@dandelion ~]$ pacman-disowned-dirs
    [sudo] password for danilo:
    [danilo@dandelion ~]$
    PS: If my password is still cached, it will work normally (my timeout is set to 30 min).
    here's my "/etc/bash.bashrc" at any rate:
    # /etc/bash.bashrc
    ## If not running interactively, don't do anything ##
    # [[ $- != *i* ]] && return
    ## Prompt display configurations ##
    set_prompt () {
    local last_command=$? # Must come first!
    PS1='\[\e[1;33m\]'
    if [[ $last_command != 0 ]]; then
    PS1+='$?'
    fi
    if [[ $EUID == 0 ]]; then
    PS1+='\[\e[1;31m\][\u@\h \W]\$\[\e[0m\] '
    else
    PS1+='\[\e[1;34m\][\u@\h \W]\$\[\e[0m\] '
    fi
    PROMPT_COMMAND='set_prompt'
    PS2='> '
    PS3='> '
    PS4='+ '
    ## Original default configs ##
    case ${TERM} in
    xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
    PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
    screen)
    PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
    esac
    ## File sourcing ##
    [ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
    ## Functions ## {{{
    ## Aliases ## {{{
    # Privileged access #
    if [ $UID -ne 0 ]; then
    alias sudo='sudo '
    alias scat='sudo cat'
    alias svim='sudoedit'
    alias root='sudo -i'
    alias reboot='sudo systemctl reboot'
    alias poweroff='sudo systemctl poweroff'
    alias update='sudo pacman -Su'
    alias netctl='sudo netctl'
    fi
    # listing #
    alias ls='ls -hF --color=auto'
    alias lr='ls -R' # recursive ls
    alias ll='ls -l'
    alias lall='ls -la'
    alias la='ll -A'
    alias lx='ll -BX' # sort by extension
    alias lz='ll -rS' # sort by size
    alias lt='ll -rt' # sort by date
    alias lm='la | more'
    # Show dirs that do not belong to any package #
    alias pacman-disowned-dirs="comm -23 <(sudo find / \( -path '/dev' -o -path '/sys' -o -path '/run' -o -path '/tmp' -o -path '/mnt' -o -path '/srv' -o -path '/proc' -o -path '/boot' -o -path '/home' -o -path '/root' -o -path '/media' -o -path '/var/lib/pacman' -o -path '/var/cache/pacman' \) -prune -o -type d -print | sed 's/\([^/]\)$/\1\//' | sort -u) <(pacman -Qlq | sort -u)"
    # Show files that do not belong to any package #
    alias pacman-disowned-files="comm -23 <(sudo find / \( -path '/dev' -o -path '/sys' -o -path '/run' -o -path '/tmp' -o -path '/mnt' -o -path '/srv' -o -path '/proc' -o -path '/boot' -o -path '/home' -o -path '/root' -o -path '/media' -o -path '/var/lib/pacman' -o -path '/var/cache/pacman' \) -prune -o -type f -print | sort -u) && <(pacman -Qlq | sort -u)"
    Last edited by DVNO (2014-08-12 05:12:57)

    You'd suppose it would work, but no, same error... Perhaps it traces back to some other configuration file...
    By the way, the second command, I didn't paste it correctly; There's no "&&" before the pacman query part of the command. Fixing the post now...
    Well, anyways, I believe I got'em working, I appended a useless command that requires elevation AND works properly, like this:
    alias pacman-disowned-dirs="sudo true && comm -23 <(sudo find / \( -path '/dev' -o -path '/sys' -o -path '/run' -o -path '/tmp' -o -path '/mnt' -o -path '/srv' -o -path '/proc' -o -path '/boot' -o -path '/home' -o -path '/root' -o -path '/media' -o -path '/var/lib/pacman' -o -path '/var/cache/pacman' \) -prune -o -type d -print | sed 's/\([^/]\)$/\1\//' | sort -u) <(pacman -Qlq | sort -u)"
    And:
    alias pacman-disowned-files="sudo true && comm -23 <(sudo find / \( -path '/dev' -o -path '/sys' -o -path '/run' -o -path '/tmp' -o -path '/mnt' -o -path '/srv' -o -path '/proc' -o -path '/boot' -o -path '/home' -o -path '/root' -o -path '/media' -o -path '/var/lib/pacman' -o -path '/var/cache/pacman' \) -prune -o -type f -print | sort -u) <(pacman -Qlq | sort -u)"
    ...Still, it's a r@t workaround, not a proper solution, so I'll ask to not mark this as solved yet. Maybe someone can backtrack this properly.
    Thank you, for the quick reply, much appreciated.

  • [SOLVED]hddtemp without sudo

    Hello!
    Is there anyway of getting hddtemp to work without having to key in the password? I have tried adding
    shylock ALL = NOPASSWD: /usr/sbin/hddtemp
    Also tried:
    %hwmon ALL = NOPASSWD: /usr/sbin/hddtemp
    What I'm trying to do is making an alias like I did with gpu temp
    alias gpu?='nvclock -i | grep temp'
    For Hddtemp as well. Now my only option left is to echo my password and feed it to sudo, which is not a good idea I think. Any help?
    Last edited by sHyLoCk (2009-06-28 02:50:47)

    Thanks for all your replies. Ok I managed to start it ith another reboot after reinstalling netcat.
    nc localhost 7634 shows me :
    |/dev/sda|???|ERR|*
    Yes it's /dev/sda, I'm getting temperature by using sudo hddtemp /dev/sda
    When I try without sudo it says /dev/sda open: Permission Denied.
    Here's mount output:
    $ mount
    /dev/sda5 on / type ext4 (rw)
    none on /dev type ramfs (rw,relatime)
    none on /proc type proc (rw,relatime)
    none on /sys type sysfs (rw,relatime)
    none on /dev/pts type devpts (rw)
    none on /dev/shm type tmpfs (rw)
    /dev/sda1 on /windows type fuseblk (rw,allow_other,blksize=4096)
    /dev/sda6 on /home type ext4 (rw)
    gvfs-fuse-daemon on /home/shylock/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=shylock)
    /dev/sdb3 on /media/Videos type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
    /dev/sdb5 on /media/Misc type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
    /dev/sdb4 on /media/zer0 type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
    /dev/sdb1 on /media/Music type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
    EDIT:  Ok I dont know what happened now i cant even use sudo?
    $ sudo hddtemp /dev/sda
    /dev/sda: Permission denied
    Last edited by sHyLoCk (2009-06-28 01:56:00)

  • [SOLVED]To wierd issues: chmod and file associasions

    Hi,
    Whenever i login to gnome i get an error message about .dmrc not being read properly due to some privelage issue. It tells me to make sure i own my home folder and set it to 644. So i use chmod to set the home folder and everything in it to 644 using this command in /home: chmod -Rv 644 username/
    Then i get error messages like this:
    chmod: can't access username/.thunderbird: no access
    failed to change mode of username/.thunderbird to 0000 (---------)
    Using nautilus i can change the privelages too, but the privelages for the owner also becomes the privelages for the group and everyone else :S So what do i do? :S
    My second issues is that every file, wether it be .avi, .txt, .pdf, .mp3 or anything else, Gnome recognizes it to be textfiles all of them. So it tries to open my .avi files with gedit. If i change it to open with totem, totem will try to play my text files Might these two cases be related?
    Last edited by skinney (2008-06-25 08:42:44)

    WiLLiE wrote:
    skinney wrote:Hi,
    My second issues is that every file, wether it be .avi, .txt, .pdf, .mp3 or anything else, Gnome recognizes it to be textfiles all of them. So it tries to open my .avi files with gedit. If i change it to open with totem, totem will try to play my text files Might these two cases be related?
    I have the same problem here.
    Never seen that bug before, must be something with the new gnome packages.
    u guys should have a look at this thread -> http://bbs.archlinux.org/viewtopic.php?pid=385084

  • [solved]Just made a 32-bit chroot, but have some issues

    I can't run anything from it as a normal user.  It says the user does not exist. Was I supposed to create a new user in chroot-land?
    How can I change my PS1 in .bashrc to tell me when I'm working in the chroot?
    Last edited by pogeymanz (2008-06-16 22:39:09)

    The chroot has its own /etc/passwd and /etc/shadow, so yes, you need to recreate the user there. It would be kind of silly if the chroot used the same config files as the real /, wouldn't it
    And if you recreate that user, you'll probably want to copy over your real .bashrc and make a slight modification to the PS1 line.

  • Sudo chown + chmod on system drive?

    Hello,
    Before I mess my system drive up I wanted to check if this is ok.
    For various reasons I have created a new Account that I wish to migrate to. I log in ok and can change permissions but there seem to be files on various places that I keep having to set permissions for and wish to resolve this for the whole drive.
    What I want is a way to set permissions on all non system files to add admin access as it appears it is not there for certain files
    I found the below commands which worked on my media drive but am reluctant to run it on the system drive:
    sudo chflags 0 /Volumes/System
    sudo chown 0:80 /Volumes/System
    sudo chmod 775 /Volumes/System
    sudo chmod -N /Volumes/System
    I think the one above should have the "R" in as below to do this recursivly ?
    sudo chmod -RN /Volumes/System
    I don't want to mess up the system drive so I thought I should check if this is ok or not. I think some system files need to be read only so I need to know if this will render the drive useless(I do have a full backup).
    I also see people recomend Batchmod but am again unsure if this will work or what settings to use?

    Thanks Niel,
    I have read numorous posts from yourself and V.K. relating to locked secondary drives but nothing relating to system drives and fully expected that answer. can I bother you a bit more please?
    Can I safly run those commands on some of these folders?
    system\users\olduseraccount
    System\library\application support
    System\library\audio
    I think that would solve most issues there are hundreds of folders with presets from plugins that have installed with only my old account as read write not admins?
    Thanks again Niel
    Ross

  • [SOLVED] I did a dumb thing... (chmod/chown)

    Hi all, hope this is the right section,
    So I decided that I was tired of authenticating when I wanted to change some files for my SLiM theme, and decided to add permissions to my user.. on the entire share folder. Well, here's what I ran:
    [naut@arch /usr]$ sudo chown -Rv root:naut share/ && sudo chmod -Rv 664 share/
    Yep. So after I did that I noticed that xfce stopped working properly; all of my icons, panels, etc, were showing as follows: ▖▖▖▖▖▖▖▖▖▖
    I immediately tried to revert the change my chowning back to root:root, and setting most files back to 644, but it had no effect. I logged out and logged back in to see if it was a temporary thing, but when I logged back in, even more items were showing ▖▖▖▖▖▖▖▖▖▖. I switched to another tty and chmoded all of /usr/share to 777... now I know that's generally a bad idea but when I logged back in, I did see that it at least went back to normal functionality.
    So my question becomes, how can I know what dirs/files need what permissions? I'd like to get it back to where I have the least permission required for everything to work properly.
    Last edited by naut (2014-05-09 14:56:16)

    644 broke things because directories need execute permissions to be traversable.
    Unfortunately, /usr/share is a grab-bag of permissions:
    # find /usr/share -type f -exec ls -l {} + | cut -d ' ' -f 1 | sort | uniq -c
    2879 -r--r--r--
    4 -r-xr-xr-x
    49229 -rw-r--r--
    12 -rw-r-xr--
    143 -rw-rw-r--
    277 -rwxr-xr-x
    3 -rwxrwxr-x
    You'd probably be safe enough to set all files to 644 and all directories to 755, but you might want to check with pacman -Qkk and reinstall any packages that complain about permissions mismatches. This won't fix everything though, as some packages still pre-date MTREE files.

  • [SOLVED] Sudo and seteuid issues

    A couple of days ago, something strange happened to my user account.  I  couldnt log into my window manager (enlightenment) as a non-root user.  Also, each time I would try to issue a command using sudo, it would return some error about seteuid (I can't rememer exactly what it said).  So I fiddled around with the sudoers file to make sure I had sudo access (which I now do), but I still can't issue the startx command as a non-root user or without sudo.  I suspect it has something to do with the seteuid error, but I don't know what to do about it.  If I run startx, it returns:
       Fatal server error: Cannot move old log file "/var/log/Xorg.0.log" to "/var/log/Xorg.0.log.old"
       xinit: givingup
       xinit: unable to connect to X server: Address family not supported by protocol
       xinit: server error
    I tried changing the permissions on these files, which didn't work.  Hours of google searching hasn't helped much, but here is a link to a page that describes a problem as similar to mine as I could find:  http://forum.tinycorelinux.net/index.php?topic=195.0
    It mentions this:
       BTW, the "Can't open /var/log/Xorg.o.log" is possibly because "set uid" became unset in the tcz conversion - does "ls -l /usr/local/bin/Xorg" show an "s" in there somewhere?"
    but I don't even have that file to try to use their solution.
    /home/user/.xinitrc contains only 1 line:  exec enlightenment_start
    Please help me figure what to do about the seteuid or setuid, so I can run startx as a non-root user, again.  Thanks!
    Last edited by cubisttriangle (2012-01-22 22:45:03)

    Awesome! Thank you, smudge! To fix:
    $ whereis Xorg
    Xorg: /usr/bin/Xorg /usr/share/man/man1/Xorg.1.gz
    $ ls -la /usr/bin/Xorg
    -rwxr-xr-x 1 root root 1.9M Dec 17 01:18 /usr/bin/Xorg
    $ sudo chmod +s usr/bin/Xorg
    -rwsr-sr-x 1 root root 1.9M Dec 17 01:18 /usr/bin/Xorg
    After these commands, I could get into my window manager again without root privileges.

  • My safari does not keep my history despite all the settings and adjustment i made to the safari preferences so as to be able to keep my browsing history. the browsing history is wiped out whenever i close safari.

    i use macbook pro mid 2012, OS X mavericks. my safari does not keep my history desp[ite all the adjustments made to the settings at safari preferences. my browsing history are cleared whenever i exit safari. i dont know why. i want to try and re - in stall it . the safari is version 7.0.1. but i dont know how.

    If you're having trouble making changes to files that are inside your home folder (represented by a house icon in the sidebar of a Finder window), or if you can't get changes to the settings of an application to stick, then please see below.
    Back up all data.
    This procedure will unlock all your user files (not system files) and reset their ownership and access-control lists to the default. If you've set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it.
    I've tested these instructions only with the Safari web browser. If you use another browser, they may not work as described.
    Step 1
    If you have more than one user account, and the one in question is not an administrator account, then temporarily promote it to administrator status in the Users & Groups preference pane. To do that, unlock the preference pane using the credentials of an administrator, check the box marked Allow user to administer this computer, then reboot. You can demote the problem account back to standard status when this step has been completed.
    Triple-click anywhere in the following line on this page to select it:
    { sudo chflags -R nouchg,nouappnd ~ $TMPDIR..; sudo chown -R $UID:staff ~ $_; sudo chmod -R u+rwX ~ $_; chmod -R -N ~ $_; } 2>&-
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.
    You'll be prompted for your login password. Nothing will be displayed when you type it. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command may take a few minutes to run, or perhaps longer if you have literally millions of files in your home folder. Wait for a new line ending in a dollar sign ($) to appear, then quit Terminal.
    Step 2 (optional)
    Take this step only if you have trouble with Step 1 or if it doesn't solve the problem.
    Boot into Recovery. When the OS X Utilities screen appears, select
    Utilities ▹ Terminal
    from the menu bar. A Terminal window will open.
    In the Terminal window, type this:
    res
    Press the tab key. The partial command you typed will automatically be completed to this:
    resetpassword
    Press return. A Reset Password dialog will open. You’re not going to reset a password.
    In the dialog, select the startup volume ("Macintosh HD," unless you gave it a different name) if it's not already selected.
    Select your username from the menu labeled Select the user account if it's not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
     ▹ Restart
    from the menu bar.

  • Lightroom 4 crashes when trying to open the slideshow module. I spent over three hours with both Adobe and Apple tech support and we know it is a permission issue but have not been able to get it solved.  It started with the last upgrade to 10.8

    Lightroom 4 crashes when trying to open the slideshow module. I spent over three hours with both Adobe and Apple tech support and we know it is a permission issue but have not been able to get it solved.  It started with the last upgrade to 10.8

    Back up all data.
    This procedure will unlock all your user files (not system files) and reset their ownership and access-control lists to the default. If you've set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it.
    Step 1
    If you have more than one user account, and the one in question is not an administrator account, then temporarily promote it to administrator status in the Users & Groups preference pane. To do that, unlock the preference pane using the credentials of an administrator, check the box marked Allow user to administer this computer, then reboot. You can demote the problem account back to standard status when this step has been completed.
    Triple-click the following line to select it. Copy the selected text to the Clipboard (command-C):
    { sudo chflags -R nouchg,nouappnd ~ $TMPDIR.. ; sudo chown -Rh $UID:staff ~ $_ ; sudo chmod -R u+rwX ~ $_ ; chmod -R -N ~ $_ ; } 2> /dev/null
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command will take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear, then quit Terminal.
    Step 2 (optional)
    The first step should give you usable permissions in your home folder. This step will restore special attributes set by OS X on some user folders to protect them from unintended deletion or renaming. You can skip this step if you don't consider that protection to be necessary.
    Boot into Recovery by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.
    When the OS X Utilities screen appears, select
    Utilities ▹ Terminal
    from the menu bar. A Terminal window will open.
    In the Terminal window, type this:
    resetpassword
    That's one word, all lower case, with no spaces. Then press return. A Reset Password window will open. You’re not  going to reset a password.
    Select your boot volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
     ▹ Restart
    from the menu bar.

  • [SOLVED] Root mounted as "Read-only filesystem". mkinitcpio issue?

    I am currently in the middle of setting up system encryption with LUKS. I have been making good progress so far, but I do have one remaining issue.
    After typing my LUKS password, the Linux kernel starts to complain that root is a read-only filesystem. "Starting NetworkManager... cannot touch file XYZ: Read-only filesystem". When it has finally finished booting, I am dropped into a TTY. I can log in and cat my files, but I cannot write to any files our use any programs that do (like pacman).
    I wonder if this is an mkinitcpio issue, but I am not sure. For whatever it's worth, here's my basic setup:
    * /dev/sda1: Boot
    * /dev/sda2: Swap
    * /dev/sda3: Root (LUKS/ext4)
    * menu.lst looks like this
    * /etc/fstab contains this line:
    /dev/mapper/root / ext4 defaults 0 1
    * /etc/mkinitcpio.conf contains these lines:
    MODULES="ext4"
    HOOKS="base udev pata scsi sata encrypt filesystems"
    edit: I should note that I did reinstall the kernel after making those edits to mkinitcpio.conf.
    Any idea what I'm doing wrong? As always, I really do appreciate the help. Thanks in advance!
    Last edited by jalu (2011-04-16 22:14:20)

    So it looks like this major problem was caused by a minor mistake. The file /etc/rc.sysinit was not executable. This made it impossible for the kernel to run the script, which in turn made it impossible for the kernel to mount /dev/sda2 (the swap partition) at /dev/mapper/swap. For some unknown reason, this in turn caused /dev/sda2 to be mounted at /, messing everything up.
    Anyway, a simple sudo chmod +x /etc/rc.sysinit fixed the problem. Thanks for the help, MadTux!

  • [Solved] Problem with file permissions for a group

    I'm working on a simple Apache HTTP server just to get a small education in proper unix work.
    To save myself sudoing everything (and generally because it seems the proper way to use unix), I'm trying to give my user control over the /srv directory. So I ran:
    - `sudo groupadd srvadmin` to create a group called srvadmin
    - `sudo chown -R :srvadmin /srv` to change the group-owner of /srv to srvadmin (and all files inside it)
    - `sudo chmod -vR g+w /srv` to give /srv and all its files group write permission
    - `sudo gpasswd -a <me> srvadmin` to add my user to the srvadmin group
    But I still can't create or edit files in /srv
    "ls -l / | grep srv" gives:
    drwxrwxr-x 4 root srvadmin 4096 Dec 19 17:44 srv
    all the files and directories inside /srv also have group write permissions and are owned by user "root" and group "srvadmin"
    "cat /etc/group | grep srv" gives:
    srvadmin:x:1000:<me>
    However, possibly herein lies a clue:
    "id" gives:
    uid=1000(<me>) gid=100(users) groups=100(users),7(lp),10(wheel),50(games),91(video),92(audio),93(optical),95(storage),96(scanner),98(power)
    That is, "id" doesn't tell me I'm in the srvadmin group.
    It seems like there's an important concept about groups and permissions that I'm not getting, but reading several man and wiki pages hasn't enlightened me. Could anyone suggest what I'm missing?
    Thanks.
    Last edited by bjackman (2012-01-15 20:43:09)

    fsckd wrote:
    bjackman wrote:Edit: I'm guessing only mods can put [Solved] tags in a title?
    No, our job is to tell you to do it yourself: https://wiki.archlinux.org/index.php/Fo … ow_to_Post (second to last bullet)
    Ok, this is pretty embarrassing given the parallels with the topic of this thread, but I coudn't edit the title (which is the reason for my earlier remark; I assumed I didn't have permission)!
    The text box was un-editable (not "disabled", I just couldn't edit the text in it). I managed to change it in the end by deleting all the text and typing a new title. I think it may have been just because the title was at the exact character limit.

Maybe you are looking for