View previous topic :: View next topic |
Author |
Message |
rado3105 Apprentice
Joined: 14 Jul 2007 Posts: 293
|
Posted: Wed Oct 08, 2008 9:42 am Post subject: How to allow all users to write to disk? |
|
|
Hi I changed fstab to mount partition /dev/hda4 to /media/disk, like this:
Code: | /dev/hda4 /media/disk ext3 defaults 0 2 |
but after restart I as nonroot user I cant write to that partition, can you help? |
|
Back to top |
|
|
Sadako Advocate
Joined: 05 Aug 2004 Posts: 3792 Location: sleeping in the bathtub
|
Posted: Wed Oct 08, 2008 9:51 am Post subject: |
|
|
It's not a matter of allowing all others write to the disk or partition (which you should never do), it's a matter of allowing all users write to the mounted filesystem.
`chmod a+rwX /media/disk/` while it's mounted should give you what you're after. _________________ "You have to invite me in" |
|
Back to top |
|
|
rado3105 Apprentice
Joined: 14 Jul 2007 Posts: 293
|
Posted: Wed Oct 08, 2008 10:25 am Post subject: re |
|
|
chmod a+rwX /media/disk/
this command applies only to one folder, the rights of subfolders and files in subfolders stays unchanged. How to changed privilleges of all folder, subfolder and files, that are on that disk?
Last edited by rado3105 on Tue Oct 14, 2008 4:01 pm; edited 2 times in total |
|
Back to top |
|
|
rado3105 Apprentice
Joined: 14 Jul 2007 Posts: 293
|
Posted: Tue Oct 14, 2008 3:52 pm Post subject: re |
|
|
I also executed:
sudo chown r-c:r-c /media/disk
sudo chmod 770 /media/disk
r-c is the name of user, and didnt helped
Then I executed chmod a+rwX /media/disk/xxx
xxx is subfolder, now I can write to that subfolder, but I must execute that command to all subfolders |
|
Back to top |
|
|
button n00b
Joined: 24 Dec 2007 Posts: 65 Location: Croatia
|
Posted: Tue Oct 14, 2008 5:09 pm Post subject: |
|
|
Well, why not make the computer do the dirty work for you? After all, that is what computers are for
Code: |
chmod -R a+rwX /media/disk
|
-R == recursively, as described in chmod man page.
You have to execute it as root, or prefix it with sudo. |
|
Back to top |
|
|
rado3105 Apprentice
Joined: 14 Jul 2007 Posts: 293
|
Posted: Wed Oct 15, 2008 7:43 am Post subject: re |
|
|
Code: | chmod -R a+rwX /media/disk |
THIS DOESNT HELPED,still the same I cant write to subfolders |
|
Back to top |
|
|
button n00b
Joined: 24 Dec 2007 Posts: 65 Location: Croatia
|
Posted: Wed Oct 15, 2008 8:42 am Post subject: |
|
|
please post an error messages, if any, and an output of 'ls -l /media/disk' |
|
Back to top |
|
|
rado3105 Apprentice
Joined: 14 Jul 2007 Posts: 293
|
Posted: Wed Oct 15, 2008 9:31 am Post subject: re |
|
|
There is no message, just I cant write to all subfolders, if I want to write I have to all subfolder chmod.
ls -l /media/disk
|
|
Back to top |
|
|
button n00b
Joined: 24 Dec 2007 Posts: 65 Location: Croatia
|
Posted: Wed Oct 15, 2008 4:57 pm Post subject: |
|
|
Well, that is strange. Where are those subfolders you're trying to write to? Are you sure you mounted your partition? Please post the output of 'mount'. |
|
Back to top |
|
|
|