Operating System - Linux
1752378 Members
6042 Online
108788 Solutions
New Discussion юеВ

Granting specific user permissions on a file owned by another user

 
Samer Dahr
Advisor

Granting specific user permissions on a file owned by another user

Hi All,

I am facing a specific problem where I need USER1 to access a linux system and have full permissions on only 1 directory which is located under the home directory of USER2

I have tried the following solutions:

- setfacl
- hard soft lynks
- thought of adding to group of user2

all failed.

P.S. I noticed this weird syntax next to the permissions of -rw-rw-r--+ .
Any idea what the + means. I appears next to all files and directory permissions for user2

Any help is welcome

Regards.
2 REPLIES 2
Steven Schweda
Honored Contributor

Re: Granting specific user permissions on a file owned by another user

> - setfacl

My psychic powers are too weak to tell me
which options you used with this command.

> - hard soft lynks

My psychic powers are too weak to tell me
what you meant by this.

> - thought of adding to group of user2

Your psychic powers may be too weak for
merely thinking of adding (what?) to some
group or other to have any effect. Or did
you do more than just think about it?

Perhaps it would help if you described
exactly what you did and what happened when
you did it, so that someone might be able to
tell you why. An actual "ls -l" report on a
file might also be helpful, along with an
extract from the "group" file which says
who's in which.

> Any idea what the + means.

Knowing nothing, I'd guess that it means that
there's an ACL on that file, too. Doesn't
"man ls" tell you what it means?
Ivan Ferreira
Honored Contributor

Re: Granting specific user permissions on a file owned by another user

All will fail because you need to grant access permission to USER2 home, not only to the file in that home.

Will be better if you don't use acl, move the file to another directory, and add user1 and user2 to a common group to enable the file/directory access.

Please remember to keep asigning points.

Cheers.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?