LinuxQuestions.org
Visit Jeremy's Blog.
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 03-16-2007, 08:31 PM   #1
IMOBoss
LQ Newbie
 
Registered: Oct 2006
Location: Imotski
Distribution: Slackware 11
Posts: 10

Rep: Reputation: 0
permission question


How to change permission for folder and files?
When I type e.g.

#chmod 755 folder

that change permission only folder but not for files and subfolders.
 
Old 03-16-2007, 08:40 PM   #2
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
the -R option will recursively chmod files and folders.
Check the man page by typing man chmod in a console
 
Old 03-16-2007, 08:43 PM   #3
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
I don't think you are very clear with your question. The same command is used for both files and directories.
The permissions themselves, like the execution bit, and the sticky bit may have a different meaning for directories then for files.

Perhaps you meant to ask, how to change the permissions on a directory and all subdirectories and files inside.
You can use the recursive option.

See the man page of chmod for details. The info page for coreutils has more information about file permissions.

Last edited by jschiwal; 03-21-2007 at 06:42 AM. Reason: fixed typo
 
Old 03-17-2007, 11:17 AM   #4
IMOBoss
LQ Newbie
 
Registered: Oct 2006
Location: Imotski
Distribution: Slackware 11
Posts: 10

Original Poster
Rep: Reputation: 0
actually this is a problem
I have Linux on my IDE disc, and now attached new SATA disc with two NTFS partition and when I mount that, only root can access. How to change that another user can access?
 
Old 03-17-2007, 12:11 PM   #5
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
ok, in your fstab file you should have something like this: let's call the NTFS partitions hda2 & hda3.

Code:
/dev/hda2 /mount/point1 NTFS defaults,noauto,user 0 0
/dev/hda3 /mount/point2 NTFS defaults,noauto,user 0 0
This will allow a user to mount the partitions once the system is booted. That user will then be the owner of the devices.
If you want them to mount during boot, then remove the noauto option. Note that if you do this, user ROOT will be mounting the drives during boot, so ROOT will have to unmount them if you want to remount them as a user. Also make sure the mountpoint is accessible by the user also, and not only ROOT. You could also in this case assign a UID= to the devices, making them mount and owned by user <uid#>
If you still have problems, you may need to make sure the etc/fstab file is readable by the user, not just ROOT.
Let us know if this works.
Also, check the man page for full details: type 'man mount' or 'man fstab'

Last edited by GrapefruiTgirl; 03-17-2007 at 12:14 PM.
 
  


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
Permission question satimis Linux - General 7 09-29-2005 02:53 AM
Question on permission satimis Linux From Scratch 5 09-28-2005 03:42 AM
Another permission question javamdk Ubuntu 6 08-20-2005 10:09 AM
FTP permission Question Supp0rtLinux Linux - Software 2 04-29-2003 08:03 PM
Permission question, (short) Stingreen Linux - General 5 03-15-2002 12:19 AM


All times are GMT -5. The time now is 11:06 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration