Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cannot write to external USB drive
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
evoweiss
Veteran
Veteran


Joined: 07 Sep 2003
Posts: 1678
Location: Edinburgh, UK

PostPosted: Sat Jan 31, 2009 6:36 pm    Post subject: Cannot write to external USB drive Reply with quote

Hi all,

I just installed a new external USB drive. I formatted it and am using the ext4 filesystem.

Anyway, there's a problem. While I can, as a user, mount the drive without any trouble at all, whenever I try to write a file to it I get the following:

Code:
touch: cannot touch `/mnt/usbdrive/test': Permission denied


Mind you, there's no problem with root writing files and I can read any files that are written to the drive by root.

I'm using udev and the fstab entry for this drive is:

Code:

/dev/sda1               /mnt/usbdrive   ext4            noauto,rw,user,exec     0 0


Thus, it seems to be a basic permissions issue, though I'm fairly certain that I'm in the right groups, etc.

Best,

Alex
Back to top
View user's profile Send private message
evoweiss
Veteran
Veteran


Joined: 07 Sep 2003
Posts: 1678
Location: Edinburgh, UK

PostPosted: Sat Jan 31, 2009 6:58 pm    Post subject: Reply with quote

Hi all,

I'm not sure if I solved it or not, but it involved a weird bit of mojo that I read somewhere.

Basically, I did the following:

Code:

mount /mnt/usbdrive
chown username /mnt/usrb
touch /mnt/usbdrive/test
umount /mnt/usbdrive


Then, when I remounted, the ownership, etc. was back to root. However, I could read, write, etc. to the drive normally. I'm going to try and reobot to see whether this state of affairs remains.

Best,

Alex
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7471

PostPosted: Sat Jan 31, 2009 10:02 pm    Post subject: Re: Cannot write to external USB drive Reply with quote

evoweiss wrote:

Code:

/dev/sda1               /mnt/usbdrive   ext4            uid=1000,gid=100,noauto,rw,user,exec     0 0



if cat /etc/password | grep 1000:100 = your username, you'll be fine
Back to top
View user's profile Send private message
evoweiss
Veteran
Veteran


Joined: 07 Sep 2003
Posts: 1678
Location: Edinburgh, UK

PostPosted: Sat Jan 31, 2009 10:18 pm    Post subject: Re: Cannot write to external USB drive Reply with quote

krinn wrote:
evoweiss wrote:

Code:

/dev/sda1               /mnt/usbdrive   ext4            uid=1000,gid=100,noauto,rw,user,exec     0 0



if cat /etc/password | grep 1000:100 = your username, you'll be fine


Well, that is my username, though when I do this it tells me the wrong filesystem is being used, etc.

Alex
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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