Answer the question
In order to leave comments, you need to log in
How can different users who are not the owner of the file be given different access?
How can different users who are not the owner of the file be given different access?
For user 1 to be the owner, user 2 can both read and write, and 3 can only read. they are all in the same group
Answer the question
In order to leave comments, you need to log in
If you do not go into ACL, but use only standard rights, then like this:
# Первый пользователь
useradd user1
# Второй пользователь
useradd user2
# Третий пользователь
useradd user3
# Создаем группу usersgroup
addgroup usersgroup
# Добавляем туда пользователей user1 и user2
adduser user1 user2 usersgroup
# Выдаем права на файл
chown user1:usersgroup file
chmod u=rwx,g=rw,o=r file
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question