Results 1 to 5 of 5

Thread: Folder permissions changed automatically

Hybrid View

  1. #1
    Join Date
    Jan 2013
    Beans
    14

    Folder permissions changed automatically

    Hey guys first of all I searched a lot on this site but didnt get any exact answer to my questions. Dont know something happened automatically and all the folders permissions changed automatically and there came a lock icon on all of my folders and files. Then I searched on this site and got the solution as this command

    sudo chown 777 -R $USER:$USER $HOMEIt solved my problem half way, it removed the lock icon but now all folders permissions are read only so please guide me how to reset all the folder permissions as it was previously?
    I'm using ubuntu 12.10
    Thanks

  2. #2
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: Folder permissions changed automatically

    Code:
    sudo chown 777 -R $USER:$USER $HOME
    This command looks wrong. You're mixing chmod and chown syntax here. I suppose what you've meant is

    Code:
    sudo chown -R $USER: $HOME
    chmod -R 777 $HOME
    Still, I advise you against running the second command: although it'll give you full access to all your files, it also will make them all executable and world-writeable in the process. Instead, try this
    Code:
    chmod -R ug+rwX ~
    This will give the owner and group members read and write access plus make directories searcheable and retain execute bit on files that already have it set.

  3. #3
    Join Date
    Nov 2012
    Location
    Halloween Town
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Folder permissions changed automatically

    Assuming that you are referring to your home directory, you can:
    Code:
    find ~ -type d -exec chmod u+rwx \{\} \;
    Note that this will only work for folders, not files, and will set the read, write and execute permissions for the owner of the directory.

  4. #4
    Join Date
    Aug 2011
    Location
    52° N 6° E
    Beans
    2,869
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Folder permissions changed automatically

    Code:
    chmod -R u=rwX $HOME

  5. #5
    Join Date
    Jul 2010
    Location
    /run/shm
    Beans
    825
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Folder permissions changed automatically

    If you want to set your home directory to Read/Write for you and NOT for everyone else (Other users on the system), run this command
    Code:
    chmod -R u=rwX,g=rX,o= $HOME
    Quote Originally Posted by Linus Torvalds
    "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program."

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •