You are not logged in.

#1 2005-10-10 11:13:54

Panu
Member
From: UK
Registered: 2005-10-09
Posts: 27

USB stick permissions problem [solved]

Hi,

As a root, I mount my USB stick with: mount /dev/sda1 /mnt/stick

Prior to mounting the /mnt/stick directory has these permissions:

drwxrwxrwx 2 panu root

After connecting the stick and mounting, the permissions are:

drxwr-xr-x 7 root root

I can read it as a user but write only with root. After mounting the permissions can't be changed with chmod.

1. How could I write it as user?
2. Do I need to add something to fstab? currently I have nothing concerning the usb stick.

Thanks for any help!

Offline

#2 2005-10-10 11:17:08

pressh
Developer/TU
From: Netherlands
Registered: 2005-08-14
Posts: 1,719

Re: USB stick permissions problem [solved]

You should add a line to fstab simillar to

/dev/sda1            /mnt/stick     vfat      rw,user,noauto           0    0 

Now you will be able to mount your usb stick AS USER using

mount /mnt/stick

Offline

#3 2005-10-10 11:26:03

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: USB stick permissions problem [solved]

if the above doesn't work try adding umask=0000 before 0  0.

Offline

#4 2005-10-10 11:42:28

Panu
Member
From: UK
Registered: 2005-10-09
Posts: 27

Re: USB stick permissions problem [solved]

ok,

I appended the fstab as pressh suggested, and rebooted. Nothing changed: can still only mount as root and can only write as root.

then added the umask command so that the fstab line looks like this:

/dev/sda1  /mnt/stick  rw,user,noauto,umask=0000   0    0

Is this what you meant, Penguin? I rebooted, but still no change, and the permissions before and after the mounting are as I described in the first post.

Could it be something with groups? My user belongs to audio, storage, video and optical. Is there some other groups it should belong to?

Offline

#5 2005-10-10 11:44:16

Panu
Member
From: UK
Registered: 2005-10-09
Posts: 27

Re: USB stick permissions problem [solved]

Panu wrote:

/dev/sda1  /mnt/stick  rw,user,noauto,umask=0000   0    0

and vfat is there also after the /mnt/stick bit of course..

Offline

#6 2005-10-10 11:59:06

pressh
Developer/TU
From: Netherlands
Registered: 2005-08-14
Posts: 1,719

Re: USB stick permissions problem [solved]

Panu wrote:

/dev/sda1  /mnt/stick  rw,user,noauto,umask=0000   0    0

Is this what you meant, Penguin?

Yes that's what he meant.

Don't think it can be a problem with groups, others than that you can perhaps have a mistype in the fstab line (e.g. wrote 'users' instead of 'user')

You actually mount using

mount /mnt/stick

????

because when you use

mount /dev/sda1 /mnt/stick

/etc/fstab will not be used, and so you'll not be able to mount as user

Offline

#7 2005-10-10 12:04:17

Panu
Member
From: UK
Registered: 2005-10-09
Posts: 27

Re: USB stick permissions problem [solved]

pressh wrote:

You actually mount using

mount /mnt/stick

????

because when you use

mount /dev/sda1 /mnt/stick

/etc/fstab will not be used, and so you'll not be able to mount as user


Dankjewel! That's what it was..

Offline

Board footer

Powered by FluxBB