E
E
Evgeny Ivanov2017-03-22 07:21:30
linux
Evgeny Ivanov, 2017-03-22 07:21:30

How to give a group permissions to a folder?

There is a folder. You need to give the group rights to this folder.
It is necessary that users of the group1 group
- could not do anything with this folder (change the name, delete)
- could do anything in this folder (create files, folders, delete, change anything ...)
now the rights are (ls -l ) drwxrwxr 4 root group1 4096
The command chown group1 /home/Shared_files does not work (it says no user group1 - and it's a group correctly)
do you need some parameter in the command or is everything much more complicated?
You can't change the group in the GUI - there are only users.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
M
mureevms, 2017-03-22
@logpol32

Syntax of spelling polizator:group. You just need not specify the user:
chown :group1 /home/Shared_files

S
Stepan Krapivin, 2017-03-22
@xevin

You need to assign the "sticky bit" of the group to the folder.
After that, all created files will automatically have a group like the folder itself

C
CityCat4, 2017-03-22
@CityCat4

man setfacl
man getfacl
for some reason they are always forgotten when talking about rights. The sticky bit they are talking about here is a good thing for directories like /tmp - where everyone can create a daddy for themselves and pervert with it, but everyone will not have access to the other person's daddy

V
Victor Taran, 2017-03-22
@shambler81

chown - R user1:group1 /var/www/ - so you can change the group and user.
Now for rights.
Standard rights are only standard ones, in fact, they are much larger
, for example, there is a stick bit , permission to only append, and so on. there are also utilities that allow you to do this at the fs level
ON web servers, this is often organized, you can manage anything in folders to add to them. Look at them but don't put the file next to them, don't delete them.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question