0

Using the following set of permissions, default RWX is set for user. For some reasons this won't affect new created files.

Any idea how to get RWX permissions for new created files (under /home/admin) too?

root@admin:# getfacl /home/admin/ getfacl: Removing leading '/' from absolute path names # file: home/admin/ # owner: admin # group: some_group user::rwx group::r-x other::--- default:user::rwx default:group::r-x default:other::--- 

As "admin" user

admin@admin:~$ mkdir test1 admin@admin:~$ getfacl test1 # file: test1 # owner: admin # group: some_group user::rwx group::r-x other::--- default:user::rwx default:group::r-x default:other::--- admin@admin:~$ touch test1/testfile admin@admin:~$ getfacl test1/testfile # file: test1/testfile # owner: admin # group: some_group user::rw- group::r-- other::--- 

As you can see, no RWX permissions set for the created file.

Are ACLs required or is there any chance of achieving the same result using umask?

2
  • Did you set the -d option during setfacl so that future files/dirs will inherit this as the default in future? Commented Feb 25, 2020 at 11:53
  • Yes for sure, as you can see, the directory is created with correct permissions set. Commented Feb 25, 2020 at 11:57

1 Answer 1

0

AFAIK by default there is no way to add x flag to files when created. Because this is special flag (able to exec the file) it must be set by hand postfactum

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.