LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Newbie
User Name
Password
Linux - Newbie This 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

Tags used in this thread
Popular LQ Tags

Reply
 
Thread Tools
Old 07-09-2009, 07:52 AM   #1
zion_rulz
LQ Newbie
 
Registered: May 2009
Location: India
Distribution: kubuntu-8.04.2
Posts: 12
Thanked: 0
Folder and file permission


[Log in to get rid of this advertisement]
I have a folder 'wscale' with 777 permission.

[root@TPL0635 out]# ls -lrt
total 1688
drwxrwxrwx 2 tux tplinux 4096 Jul 9 00:53 agrdata
drwxrwxrwx 2 tux tplinux 4096 Jul 9 17:08 wscale

Now, I want to create a user to give read only permission to this folder. How can I do this? Any help will be much appreciated.

Thanks.
zion_rulz is offline  
Tag This Post
Reply With Quote
Old 07-09-2009, 08:07 AM   #2
kirukan
Member
 
Registered: Jun 2008
Location: Srilanka
Distribution: Redhat, Solaris, Suse
Posts: 515
Thanked: 44
Quote:
drwxrwxrwx 2 tux tplinux 4096 Jul 9 17:08 wscale
The last rwx means you have allowed to all read, write and execute permissions.
kirukan is offline     Reply With Quote
Old 07-09-2009, 09:06 AM   #3
abi0909
Member
 
Registered: Jul 2009
Distribution: RHEL 3.x, 4.x, 5.x ; Ubuntu 9.04 (newbie) , Fedora 11 (newbie)
Posts: 33
Thanked: 2
drwxrwxrwx : Let me split what each part means --

d: Its a directory
rwx: Read Write Execute for User/Owner
rwx: Read Write Execute for Group
rwx: Read Write Execute for others (not the owner of the file and the users in the group, but anybody apart from this)

So if the user you are going to add is not in that group, change the permission of the file to 774. This would change the directory permission from drwxrwxrwx to drwxrwxr-- . But this would apply ONLY for the directory, so you might have to do this for all individual files in the directory.
abi0909 is offline     Reply With Quote
Old 07-09-2009, 09:23 AM   #4
vonbiber
Member
 
Registered: Apr 2009
Distribution: slackware
Posts: 228
Thanked: 28
Quote:
Originally Posted by zion_rulz View Post
I have a folder 'wscale' with 777 permission.

[root@TPL0635 out]# ls -lrt
total 1688
drwxrwxrwx 2 tux tplinux 4096 Jul 9 00:53 agrdata
drwxrwxrwx 2 tux tplinux 4096 Jul 9 17:08 wscale

Now, I want to create a user to give read only permission to this folder. How can I do this?
first
777 means rwx for everybody: the owner, the group, and all other users.
r is for 'read', w is for 'write', and 'x' is for 'execute'

to change file permissions you use the command chmod
If you want the owner of 'wscale' to be the only one to have
the write permission, you

$ chmod 755 wscale
if you 'ls' you'll see that the group (tplinux) and the other
users have rx permissions

$ ls -l
total 4
drwxr-xr-x 2 tux tplinux 4096 2009-07-09 15:07 wscale

Now, if you want the group to have write permission and the
other users only rx permissions, you

$ chmod 775 bogus

see the difference?

$ ls -l
total 4
drwxrwxr-x 2 tux tplinux 4096 2009-07-09 15:07 wscale

#######################
instead of 'chmod 775' you can also use the form
chmod o-w (remove the write permission to users that are
not in this group)

you should
man chmod
vonbiber is offline     Reply With Quote
Old 07-09-2009, 03:02 PM   #5
zion_rulz
LQ Newbie
 
Registered: May 2009
Location: India
Distribution: kubuntu-8.04.2
Posts: 12
Thanked: 0

Original Poster
Question

Thank you all for your response and assistance.

Can I have 2 different individual user IDs diff permission on a particular folder?
e.g. - Folder is DOWNLOAD
Users are 'wscale' and 'monitor'
can I assign rw for 'wscale' and r_x for 'monitor' on folder DOWNLOAD?
If yes, how? 'wscale' and 'monitor' are members of different usergroup.

Thanks.
zion_rulz is offline     Reply With Quote
Old 07-09-2009, 04:02 PM   #6
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 8.04 (upgraded from 6.06), Ubuntu Netbook Remix 9.04
Posts: 2,742
Thanked: 87
Read up on ACL (I suppose it is supported by Suse).

See http://www.linuxquestions.org/questi...?highlight=acl for my experience with it.
Wim Sturkenboom is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
configure smb.conf for set permission file and folder b-RAM Linux - Server 11 04-16-2009 04:15 AM
Folder/File Permission??? ajeetraina Linux - Newbie 3 05-30-2008 04:25 AM
File/Folder permission with ntfs-3g replica9000 Linux - General 1 10-09-2007 03:31 AM
Permission - Folder vs. File XaViaR Linux - General 23 01-28-2006 08:54 PM
File, Folder permission and SAMBA Steve1445 Linux - Newbie 2 01-15-2004 03:13 PM


All times are GMT -5. The time now is 08:47 AM.

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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration