Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Un-setting or clearing ACLs

  1. #1

    Default Un-setting or clearing ACLs

    In trying to sort out my rsync restoration of data from a NAS I find that I cannot access some of the directories even when they are in my home directory and I am logged in.

    There is mention in the directory Properties > Permissions that "This folder uses advanced permissions."

    I have no idea what this is about but could it be ACLs and how do I clear these settings so I can get on with what I am trying to do?

    Grateful for any assistance from anybody who can help please.
    Budgie2

  2. #2
    Join Date
    May 2012
    Location
    Finland
    Posts
    2,004

    Default Re: Un-setting or clearing ACLs

    Please open a terminal and go to the directory where one of these files or directories is located that you cannot access, then type;

    getfacl fileordirectoryname

    and copy paste the results here, encase them in CODE tags.

    Interesting commands to know;
    getfacl (show extended ACL's)
    setfacl (set ACLs)

    setfacl -b fileordirectory (remove all extended ACLs from the file or directory)
    setfacl -b -R directory (removes all extended ACLs from the directory and all files inside it, recursively)

    edit:
    However, I'm guessing the files and/or directories are owned by someone other than the account you are logged in as. You should be able to, as root, to chown (change ownership) these directories and files inside to your account.

    For example:
    chown -R miuku.users woot

    Would change the directory woot and all files inside that directory to ownership; user:miuku group:users
    .: miuku #suse @ irc.freenode.net
    :: miuku@opensuse.org

    .: h​ttps://download.opensuse.org/repositories/home:/Miuku/

  3. #3

    Default Re: Un-setting or clearing ACLs

    Quote Originally Posted by Budgie2 View Post
    There is mention in the directory Properties > Permissions that "This folder uses advanced permissions."

    I have no idea what this is about but could it be ACLs and how do I clear these settings so I can get on with what I am trying to do?
    Yes, those "Advanced Permissions" are ACLs.
    Miuku already wrote how to change them, but you can also change them by clicking on "Advanced Permissions..." in Properties->Permissions.

    But depending on the kind of permissions, you might have to do that as root (as Miuku wrote as well). So try with "Dolphin - Superuser Mode".

    PS: you can even change the owner of a file/directory in Properties->Permissions, if you run dolphin as root.
    Last edited by wolfi323; 12-Mar-2015 at 14:25.

  4. #4
    Join Date
    May 2012
    Location
    Finland
    Posts
    2,004

    Default Re: Un-setting or clearing ACLs

    I'm too used to doing everything from the terminal
    .: miuku #suse @ irc.freenode.net
    :: miuku@opensuse.org

    .: h​ttps://download.opensuse.org/repositories/home:/Miuku/

  5. #5

    Default Re: Un-setting or clearing ACLs

    Quote Originally Posted by Miuku View Post
    I'm too used to doing everything from the terminal
    Ok and thanks to Miuku and Wolfi. Terminal less ambiguous so here it is.
    Background. RAID array drive is mounted on /data and it has subdirectory mastermedia. This is soft linked to mastermedia directory in my home directory /home/alastair/mastermedia. One of the offending directories is ~/mastermedia/Videos.

    Here are the results of running ls -l and getfacl Videos from ~/mastermedia


    Code:
    alastair@x3400:~> cd mastermedia
    alastair@x3400:~/mastermedia> ls -l
    total 20
    drw-rw-r--   51 alastair users  4096 Mar  8  2014 Music
    drw-rw-r--  241 alastair users 12288 Mar  6 23:24 Photos
    drw-rwxr--+ 153 alastair users  4096 Mar 11 22:32 Videos
    alastair@x3400:~/mastermedia> getfacl Videos
    # file: Videos
    # owner: alastair
    # group: users
    user::rw-
    user:alastair:rwx
    group::rwx
    mask::rwx
    other::r--
    
    alastair@x3400:~/mastermedia
    As far as I am aware I am logged in as alastair so believe I should be able to open Videos directory or have I lost it altogether!!!
    Budgie2

  6. #6
    Join Date
    May 2012
    Location
    Finland
    Posts
    2,004

    Default Re: Un-setting or clearing ACLs

    What's the error if you try to cd into the Videos from the terminal?

    The normal masked permissions look a bit weird, the directory lacks execute permissions.

    imo:
    setfacl -b Videos
    chmod 775 Videos

    And try entering the directory.
    .: miuku #suse @ irc.freenode.net
    :: miuku@opensuse.org

    .: h​ttps://download.opensuse.org/repositories/home:/Miuku/

  7. #7

    Default Re: Un-setting or clearing ACLs

    Quote Originally Posted by Miuku View Post
    What's the error if you try to cd into the Videos from the terminal?

    The normal masked permissions look a bit weird, the directory lacks execute permissions.

    imo:
    setfacl -b Videos
    chmod 775 Videos

    And try entering the directory.
    So it was not ACL problem but my ignorance. I have reset permissions to 775 and problem has gone.
    Will do this recursively to all three multimedia directories and report back if I have further issues with rsync on that thread.
    Meanwhile many thanks.
    Budgie2

  8. #8
    Join Date
    May 2012
    Location
    Finland
    Posts
    2,004

    Default Re: Un-setting or clearing ACLs

    Hint;
    If you have a massive number of directories, you can set permissions in one swoop like this:

    Code:
    find targetdirectory -type d -exec chmod 755 {} \;
    What it does is change the permissions for all directories under targetdirectory to rwx (user) r-x (group) r-x (all)

    Don't run that as root though as you might mess up your system if you chmod your / by accident :-)
    .: miuku #suse @ irc.freenode.net
    :: miuku@opensuse.org

    .: h​ttps://download.opensuse.org/repositories/home:/Miuku/

  9. #9

    Default Re: Un-setting or clearing ACLs

    Quote Originally Posted by Miuku View Post
    Hint;
    If you have a massive number of directories, you can set permissions in one swoop like this:

    Code:
    find targetdirectory -type d -exec chmod 755 {} \;
    What it does is change the permissions for all directories under targetdirectory to rwx (user) r-x (group) r-x (all)

    Don't run that as root though as you might mess up your system if you chmod your / by accident :-)
    Hi Miuku,
    First another thank you for helping me sort out my system.

    I note your "find" expression and have used it once before to delete unwanted files. One question is why is the "find" expression you give better than chmod with -R?

    I am still in big trouble with trying to restore my mastermedia on main machine using rsync from NAS although the above fixed some problems. The log file runs to 6 MiB of mainly permissions denied. Will start new thread when I have clear idea what is going on.

    Budgie2

  10. #10
    Join Date
    May 2012
    Location
    Finland
    Posts
    2,004

    Default Re: Un-setting or clearing ACLs

    It allows you to change permissions for directories or files only depending on you need.

    You may have files that you don't want to have execute bit set but .sh to have it for example. Chmod would change everything.

    Type f would be all files but no dirs and type d directories but not files.
    .: miuku #suse @ irc.freenode.net
    :: miuku@opensuse.org

    .: h​ttps://download.opensuse.org/repositories/home:/Miuku/

Page 1 of 2 12 LastLast

Posting Permissions

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