LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   user permissions (https://www.linuxquestions.org/questions/linux-newbie-8/user-permissions-784105/)

CosmicSea 01-22-2010 05:31 PM

user permissions
 
I am using ubuntu and im trying to figure out how to add a user and give it read and write access to one file on the entire server only. can anybody help me?

antegallya 01-22-2010 07:11 PM

Hello

To add an user use add user (see man adduser for details)
Code:

adduser username
Do you want the user to be able to log in ? You may don't want to create a home directory for it, so you may be interested in the --no-create-home option.
Then use chmod and chown to set the permissions. Something like (see man chown and man chmod for details) :
Code:

chown username filename
chmod u+rw filename

Note that you won't have only one file whith read write access for the user on the whole server, indeed there are world readable/writable files (wanting to give access to only one file on the whole server for an user seems odd to me)

Hope it helps.

cola 01-23-2010 07:05 AM

Quote:

Originally Posted by CosmicSea (Post 3837044)
I am using ubuntu and im trying to figure out how to add a user and give it read and write access to one file on the entire server only. can anybody help me?

Follow antegallya's instructions.

Search first before posting.


All times are GMT -5. The time now is 02:53 AM.