LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

Reply
 
Search this Thread
Old 12-10-2012, 04:26 AM   #1
l0pht
Member
 
Registered: Sep 2008
Posts: 76

Rep: Reputation: 1
make a user limited


hi
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 ?
thanks
 
Old 12-10-2012, 09:37 PM   #2
mreff555
Member
 
Registered: Sep 2011
Location: Philly
Distribution: Gentoo
Posts: 443

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

Code:
man chmod
man chgrp
man chown
Every user had a UID. thats just a number.
type this:
Code:
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:
-read
-write
-execute

There are three access specifications
-User
-Group
-All

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

type
Code:
ls -l
This should list the file permissions. This is what it might look like.
Code:
-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
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 1,990

Rep: Reputation: 512Reputation: 512Reputation: 512Reputation: 512Reputation: 512Reputation: 512
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.
  


Reply


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 05:20 PM.

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