Jump to content
Sign in to follow this  
Guest Cid_Campeador

Can't mount stick r/w for users

Recommended Posts

Guest Cid_Campeador

Hi,

 

I'm using Pendrivelinux, but as far as I read, it is essentially the same as MCNLive, so I'm asking here. (Pendrivelinux has no forums, support channel or anything like that)

My stick is a normal FAT32 with a couple of Windoze programs on it, PortableFirefox among others. It saves its profile on the stick in a subfolder. I also have Pendrivelinux on it, which has its own Firefox. I now tried to symlink the Linux Firefox profile folder to the FirefoxPortable profile folder. This would probably work flawlessly, but under Linux, the user account cannot directly write to the mounted FAT32 stick and thus to the FirefoxPortable profile folder. Since it is FAT32, the permissions can't be changed.

 

So I tried remounting it with umask=000. No change. I tried uid=500 and gid=100 (refers to the 'guest' user and 'users' group), but the stick simply refuses to get mounted differently. All the files on it -ALWAYS- belong to root with the same permissions that prohibit users from writing on them. root himself has no problems with writing.

What's the matter here? Is the vfat kernel module or the mount command broken? Is there some special kind of vfat module that doesn't understand umask, uid or gid? Is there something intercepting the mount and mounting it differently? For the record, 'mount' shows the drive with mounted with -my- settings.

I understand that the risk of a user writing to the loopfile or squashfs file directly is big, but I am well aware of what I'm doing. Is this intentional? How do I fix it?

 

 

On a related note, are there other distributions that work similiar to this? (Exchangeable base squashfs image + persistent loopfile that work on top of a FAT32 stick)? I'm open to test other things :)

Edited by Cid_Campeador

Share this post


Link to post
Share on other sites

thats VERY strange, I have NEVER had any issue writing to my fat32 partitions

 

let me ask you, are you using the built in GUEST account or did you create your own?

 

that initial GIEST account is SEVERLY limited, build a user and give it root-LIKE accessed'

 

the FAt32 is mounted?

 

j

Share this post


Link to post
Share on other sites

@ mindwave – I've edited your post, because it was just one large quote that made no sense to me. :)

Share this post


Link to post
Share on other sites

1. get sure that your user belongs to the "storage" group.

# gpasswd -a %username% storage

(replace %username% with the actual user name that needs access). After that you need to re-login to make the change applicable.

2. Add this HAL policy rule somewhere in your HAL dirs, say /etc/hal/fdi/policy as (just a suggestion, you can alter the name at will) 110-storage.fdi

<policy group="storage">
 <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
 <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
</policy>

Now, simply restart hal and see what happens.

One thing that will happen for sure, and soon, is runing your pendrive, though:

keeping a live browser profile in a pendrive is a VERY bad idea... these things are not built for constant data I/O's!

Edited by scarecrow

Share this post


Link to post
Share on other sites

One thing that will happen for sure, and soon, is runing your pendrive, though:

keeping a live browser profile in a pendrive is a VERY bad idea... these things are not built for constant data I/O's!

 

 

scarecrow:

 

i have been hearing that for two years, and for 2 years i have (and still use) my ORIGINAL mcnl 2007.1 stick on a regular basis, now I carry a dozen different sticks w/ different configurations for different purposes.

 

But when you look at the MTBF rating for moden usb keys its going to be a while - IF you buy quality keys.

 

#1 DONT buy them from chinese sellers on ebay, there are a LOT of different reasons, but lets just say low quality is the best one

#2 I have a White Paper here somewhere, written by Cisco on exactly what the TRUE FIELD TIME MTBF should be, the summary is 5.7 years on the low end, 53 years on the high end.

 

Should you FFR the disk occasionally? sure

 

Should you save your "presistent" files to something OTHER than your OS Key? sure

 

but its still not the "sky is falling" that some folks predict.

heck ive had barnd new hard drives fail faster than my usb keys do

 

just my 2 cts

Share this post


Link to post
Share on other sites

The main reason for not bying those sticks from ebay, is that they are "overclocked"- formatted as 16GB or who knows how much, while in reality being 2GB or less.

You can use quite a few diagnostic tools to find the actual pendrive capacity.

On principle I could agree that quality keys do matter, but since currently 99% of these keys are made in China (even the ones branded as Corean and Taiwanese!), I'm afraid I must be more specific... :P

Share this post


Link to post
Share on other sites
Guest Cid_Campeador

Hi. Sorry for not responding for so long, I was busy with other things and forgot about my Pendrive... :)

 

Yes, I'm aware that Flash-based storage wears out pretty quickly. But it's not like I use it every day, so I doubt that it will be much of a problem. By the time it dies, there will be 1TB pendrives available anyway :)

 

 

let me ask you, are you using the built in GUEST account or did you create your own?

 

that initial GIEST account is SEVERLY limited, build a user and give it root-LIKE accessed'

Yes, I'm using the default liveuser. But theoretically, that shouldn't be a problem.

 

 

1. get sure that your user belongs to the "storage" group.

# gpasswd -a %username% storage

(replace %username% with the actual user name that needs access). After that you need to re-login to make the change applicable.

2. Add this HAL policy rule somewhere in your HAL dirs, say /etc/hal/fdi/policy as (just a suggestion, you can alter the name at will) 110-storage.fdi

<policy group="storage">
 <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
 <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
</policy>

Now, simply restart hal and see what happens.

Tried, failed.

Thanks anyway.

 

Any other ideas? :/

Share this post


Link to post
Share on other sites
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...