2

I have set the permissions for the /var/www/html directory in my Raspberry Pi like this:

# file: .
# owner: www-data
# group: www-data
user::rwx
group::rwx
other::r-x
default:user::rwx
default:group::rwx
default:group:www-data:rwx
default:mask::rwx
default:other::---

The other day I needed to copy a file from my PC running Ubuntu to this directory, so I used SFTP.The permissions for the original file are:

# file: zerotier_1.1.14-2_brcm63xx.ipk
# owner: lucas
# group: lucas
user::rw-
group::r--
other::r--

But when the file was copied over I realized that it hadn't been created with the defined ACL permissions:

# file: zerotier_1.1.14-2_brcm63xx.ipk
# owner: pi
# group: pi
user::rw-
group::rwx                      #effective:r--
group:www-data:rwx              #effective:r--
mask::r--
other::---

But if I create a file manually with the same user, it works as expected:

pi@Gawain /var/www/html $ echo "test" > testfile
pi@Gawain /var/www/html $ getfacl testfile
# file: testfile
# owner: pi
# group: pi
user::rw-
group::rw-
group:www-data:rwx              #effective:rw-
mask::rw-
other::---

What am I missing here?

  • 2
    SFTP in openssh does not support extended ACLs. – Jakuje Dec 16 '16 at 20:16
  • Rsync -a keeps ACLs – Bruno9779 Dec 16 '16 at 21:42
  • I tried rsync and got this: # file: zerotier_1.1.14-2_brcm63xx.ipk # owner: pi # group: pi user::rw- group::rw- #effective:r-- group:www-data:rwx #effective:r-- mask::r-- other::r-- – user2859982 Dec 18 '16 at 18:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.