LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 07-09-2009, 06:52 AM   #1
zion_rulz
LQ Newbie
 
Registered: May 2009
Location: India
Distribution: kubuntu-8.04.2
Posts: 12

Rep: Reputation: 0
Folder and file permission


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.
 
Old 07-09-2009, 07:07 AM   #2
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278

Rep: Reputation: 148Reputation: 148
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.
 
Old 07-09-2009, 08:06 AM   #3
abi0909
Member
 
Registered: Jul 2009
Distribution: Ubuntu, RedHat, VMWare, CentOS, Windows, Android, Mac
Posts: 55

Rep: Reputation: 18
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.
 
Old 07-09-2009, 08:23 AM   #4
vonbiber
Member
 
Registered: Apr 2009
Distribution: slackware 14.1 64-bit, slackware 14.2 64-bit, SystemRescueCD
Posts: 533

Rep: Reputation: 129Reputation: 129
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
 
Old 07-09-2009, 02:02 PM   #5
zion_rulz
LQ Newbie
 
Registered: May 2009
Location: India
Distribution: kubuntu-8.04.2
Posts: 12

Original Poster
Rep: Reputation: 0
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.
 
Old 07-09-2009, 03:02 PM   #6
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Read up on ACL (I suppose it is supported by Suse).

See http://www.linuxquestions.org/questi...?highlight=acl for my experience with it.
 
  


Reply

Tags
permission



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 03:15 AM
Folder/File Permission??? ajeetraina Linux - Newbie 3 05-30-2008 03:25 AM
File/Folder permission with ntfs-3g replica9000 Linux - General 1 10-09-2007 02:31 AM
Permission - Folder vs. File XaViaR Linux - General 23 01-28-2006 07:54 PM
File, Folder permission and SAMBA Steve1445 Linux - Newbie 2 01-15-2004 02:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:52 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