Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to allow all users to write to disk?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
rado3105
Apprentice
Apprentice


Joined: 14 Jul 2007
Posts: 293

PostPosted: Wed Oct 08, 2008 9:42 am    Post subject: How to allow all users to write to disk? Reply with quote

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
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3792
Location: sleeping in the bathtub

PostPosted: Wed Oct 08, 2008 9:51 am    Post subject: Reply with quote

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
View user's profile Send private message
rado3105
Apprentice
Apprentice


Joined: 14 Jul 2007
Posts: 293

PostPosted: Wed Oct 08, 2008 10:25 am    Post subject: re Reply with quote

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
View user's profile Send private message
rado3105
Apprentice
Apprentice


Joined: 14 Jul 2007
Posts: 293

PostPosted: Tue Oct 14, 2008 3:52 pm    Post subject: re Reply with quote

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
View user's profile Send private message
button
n00b
n00b


Joined: 24 Dec 2007
Posts: 65
Location: Croatia

PostPosted: Tue Oct 14, 2008 5:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
rado3105
Apprentice
Apprentice


Joined: 14 Jul 2007
Posts: 293

PostPosted: Wed Oct 15, 2008 7:43 am    Post subject: re Reply with quote

Code:
chmod -R a+rwX /media/disk


THIS DOESNT HELPED,still the same I cant write to subfolders
Back to top
View user's profile Send private message
button
n00b
n00b


Joined: 24 Dec 2007
Posts: 65
Location: Croatia

PostPosted: Wed Oct 15, 2008 8:42 am    Post subject: Reply with quote

please post an error messages, if any, and an output of 'ls -l /media/disk'
Back to top
View user's profile Send private message
rado3105
Apprentice
Apprentice


Joined: 14 Jul 2007
Posts: 293

PostPosted: Wed Oct 15, 2008 9:31 am    Post subject: re Reply with quote

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
Code:
total 0
Back to top
View user's profile Send private message
button
n00b
n00b


Joined: 24 Dec 2007
Posts: 65
Location: Croatia

PostPosted: Wed Oct 15, 2008 4:57 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum