T
T
trytrytry2014-12-19 22:05:09
linux
trytrytry, 2014-12-19 22:05:09

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

2 answer(s)
L
ldv, 2014-12-19
@trytrytry

help.ubuntu.ru/wiki/access_control_list

3
3vi1_0n3, 2014-12-19
@3vi1_0n3

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

Something like this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question