[[+content_image]]
M
M
Maxim2019-07-15 07:11:07
linux
Maxim, 2019-07-15 07:11:07

How can I make group O have permissions 0 when creating a file?

Hello.
Create /data/sales
Next:

chown -R .sales /data
chmod -R 2770 /data

In the directory /data/sales I create a file file
Result:
[[email protected] data]# ls -l sales
total 0
-rw-r--r--. 1 root sales 0 Jul 15 14:02 file
[[email protected] data]#

And I need the following result when creating files:
[[email protected] data]# ls -l sales
total 0
-rwxrwx---. 1 root sales 0 Jul 15 14:02 file
[[email protected] data]#

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
D
Dmitry Shitskov, 2019-07-15
@MaxRAF

It looks like you want to inherit directory permissions. This behavior is not provided by default on *nix filesystems. If you cannot do without such functionality, use ACL. Read about it as a whole, you are specifically interested in default rights. https://help.ubuntu.ru/wiki/access_control_list

V
vreitech, 2019-07-15
@fzfx

For example,setfacl -m d:o::- data

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question