LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-25-2003, 12:40 AM   #1
sureshp1980
LQ Newbie
 
Registered: Sep 2003
Location: Australia
Posts: 8

Rep: Reputation: 0
User and File access controls questions


hi,
I was in need of ur help to get the answers for the following quetions regarding User and File access controls.

1.what is the command line for creating a user account for myself and assign it to a unique group


2. how to set the permissions for my home directory such that everyone in my group can read my home directory’s contents.


3. What does ‘chmod 4775 filename’ do?



4. what is command line for setting the executable permission on a file?


5. What is the command line for inspecting the permissions assigned to a file and to directory
 
Old 09-25-2003, 02:18 AM   #2
micxz
Senior Member
 
Registered: Sep 2002
Location: CA
Distribution: openSuSE, Cent OS, Slackware
Posts: 1,131

Rep: Reputation: 75
1. Try "man useradd"
2. chmod 750 /your/home/directory (note this is only you home directory not the files and folders within)
3. this will make the filename Readable, Writable, and Excutable by User, Readable and Excutable by Group. And Nada by Others.
Quote:
From man:
A numeric mode is from one to four octal digits (0-7), derived by adding up the bits with values 4, 2, and 1. Any omit_ted digits are assumed to be leading zeros. The first digit selects the set user ID (4) and set group ID (2) and sticky (1) attributes. The second digit selects permissions for the user who owns the file: read (4), write (2), and execute (1); the third selects permissions for other users in the file's group, with the same values; and the fourth for other users not in the file's group, with the same values.
4. "chmod 755 filename" or "chmod -x filename"
5. ls -l filename then look at the "drwxr-xr-x" part d is for Directory, r is for readable, w is for writable, x is for executable. The first rwx is for user and the next for group and then others.

Hope this helps'

Last edited by micxz; 09-26-2003 at 09:54 AM.
 
Old 09-26-2003, 07:38 AM   #3
greggy69
LQ Newbie
 
Registered: Aug 2003
Location: The Netherlands
Distribution: Slackware 10.0, 2.6.13.3
Posts: 16

Rep: Reputation: 0
It may be a typo, but just for myself as newbie; I thought
Quote:
2. chmod 750 /your/home/directory (note this is only you home directory not the files and folders within)
Quote:
3. this will make the filename Readable, Writable, and Excutable by User and Group. And Readable and Excutable by Others.
chmod 750 meant user: read/write/execute, group: read/execute, others: nothing.

Just checkin'

Cheers,
Greg

 
Old 09-26-2003, 09:56 AM   #4
micxz
Senior Member
 
Registered: Sep 2002
Location: CA
Distribution: openSuSE, Cent OS, Slackware
Posts: 1,131

Rep: Reputation: 75
My bad fixed; You guys Know your permissions? How many threads does it take.
 
Old 09-26-2003, 03:20 PM   #5
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
#1
http://www.die.net/doc/linux/man/man8/adduser.8.html

#2
http://www.die.net/doc/linux/man/man1/chmod.1.html
http://www.die.net/doc/linux/man/man1/chown.1.html

#3
see number two

#4
see number two, but for example:

chmod a+x filename

would make the file executable by every user.

#5
http://www.die.net/doc/linux/man/man1/ls.1.html

ls -l

would show a list of the permissions of files and directories in current directory.


ls -la

would show a list of the permissions of files and directories (including hidden ones) in current directory.
 
Old 09-26-2003, 03:25 PM   #6
micxz
Senior Member
 
Registered: Sep 2002
Location: CA
Distribution: openSuSE, Cent OS, Slackware
Posts: 1,131

Rep: Reputation: 75
Wait' What is "ls"? How do I use it?

LOL;

Don't answer this was a joke.
 
Old 09-26-2003, 04:12 PM   #7
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
ummm... okay.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
A. how to permit more then one user to access a file mudasar Linux - Networking 2 11-20-2005 01:19 PM
ACPI controls as user mngmd Linux - Laptop and Netbook 2 06-16-2005 02:53 PM
user specific file access permission synna Linux - Security 3 01-13-2004 11:53 PM
Remove write file access for single user? HighLife Linux - Newbie 1 08-08-2003 12:22 AM
MS Access DB File multi User problem with SAMBA hellertech Linux - Networking 0 07-14-2003 05:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:29 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration