Visit the LQ Articles and Editorials section
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-10-2012, 04:26 AM   #1
Registered: Sep 2008
Posts: 78

Rep: Reputation: 1
make a user limited

in linux , i want to make a user which just have write access to one folder and subdirectories like : /var/* and /home/user

and can ssh to server. what can i do?
every time user want more privilage it can su a user with more privilage,
question 2:what means a user with uid 500 ?
Old 12-10-2012, 09:37 PM   #2
Registered: Sep 2011
Location: Philly
Distribution: Gentoo
Posts: 466

Rep: Reputation: Disabled
You'd probably make your life a little bit easier if you read the man files. try:

man chmod
man chgrp
man chown
Every user had a UID. thats just a number.
type this:
cat /etc/passwd
Each line is a separate user. Linux maintains quite a lot of user accounts, so don't be surprised if its a big list.
the data is colon deliminated. The third entry is the UID. The fourth is the GID. By default linux assigns the same GID and UID to each user.

Basically it simplifies to this. There are nine catagories of access. (there is actually some more complicated stuff but start with the basics).

There are three access types:

There are three access specifications

with each file, you can specify who owns it, what group it is in, and these 9 access permissions

ls -l
This should list the file permissions. This is what it might look like.
-rwxr-xr-- 1 user group 0 Dec 10 22:27 your_file
Of the first ten characters the last nine represent the values the first tells you what kind of file it is. - for a regular file d for directory, there are a lot more. Outside the scope.

Those last nine are telling you that the user by the username of "user" had read write and execute access to the file
Anyone who belongs to the group called "group" has read and execute access to the file
Everyone else only has read access.

That's basically what you have to work with. Simple access permissions are structured based off of this.

Hope that helps.
1 members found this post helpful.
Old 12-11-2012, 07:08 AM   #3
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 3,210

Rep: Reputation: 772Reputation: 772Reputation: 772Reputation: 772Reputation: 772Reputation: 772Reputation: 772
And you don't want to do this to /var/*...

This is used by the system for a lot of things (printing, email, crash report, log files...) and changing the owner/group to a user will prevent those facilities from working at all.
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help creating VERY LIMITED user accounts damgar Linux - Newbie 8 10-25-2009 12:57 AM
limited access user sunlinux Linux - Newbie 3 06-15-2009 12:26 PM
Limited User Access Jakeh2k1 Red Hat 1 06-07-2005 07:03 AM
i want to make a search engine like google , but limited to some urls varzosu Programming 3 06-27-2004 04:40 PM
limited user yuniarti Linux - General 1 01-01-2001 01:58 PM

All times are GMT -5. The time now is 02:16 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration