You are not logged in.

#1 2004-12-19 10:12:03

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Stuff thats like bugging me ....

I have just bought a USB flash drive

After a quick google I found the info. I needed to get access (mount point,fstab etc)

Thing thats bugging me is fstab setting most of the time I use user like this

dev/sda                /mnt/memstick auto rw,user,noauto         0    0

but you cannot mount as normal user, so I changed it to users now I can mount ok.

most of the fstabs I have seen on forum (& elsewhere) are set to user ???

Now all I want is to be able to access device as a user ie transfer files to & from device

Do I change /memstick permissions to allow this or do a link to a directory in /home ?

Mr Green


Mr Green

Offline

#2 2004-12-19 12:25:30

Alkimyst
Member
Registered: 2004-12-04
Posts: 16

Re: Stuff thats like bugging me ....

Just append "umask=000" to the options.
You probably want "sync" also so the data is written to the stick as soon as you send it.

So you'll have something like:

dev/sda                /mnt/memstick auto rw,user,noauto ,sync,umask=000        0    0 

Offline

#3 2004-12-19 12:58:37

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Stuff thats like bugging me ....

got bad fs bad superblock error .... emmm I'll read up on sync ...

Thanks anyway  wink


Mr Green

Offline

#4 2004-12-19 14:02:52

FUBAR
Member
From: Belgium
Registered: 2004-12-08
Posts: 1,029
Website

Re: Stuff thats like bugging me ....

Try mounting /dev/sda1 instead of /dev/sda. Maybe you're mounting the wrong partition (resulting in a bad superblock error).


A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.

Offline

#5 2004-12-19 14:26:53

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Stuff thats like bugging me ....

The only reason I used sda is sda1 does not show up in /dev

(unless I try running hotplug Yuk!)

its more the fact of being able to read & write to unit as user ....


Mr Green

Offline

#6 2004-12-19 14:31:42

FUBAR
Member
From: Belgium
Registered: 2004-12-08
Posts: 1,029
Website

Re: Stuff thats like bugging me ....

This is my /etc/fstab line for my USB stick:

/dev/sda1               /stuff/usbstickie       vfat    user,noauto,uid=fubar,gid=users,sync            0 0

My normal user (fubar) can mount it read/writable.


A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.

Offline

#7 2004-12-19 15:29:02

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Stuff thats like bugging me ....

sooo like it does not matter where its mounted then .... smile

I will give your line a go  wink  (change user doh!)

No that did not work either wondering if it has anything to do with udev ... ????

your line gives me bad superblock error .......

EDIT reading on web I needed to set up a superdir on device that has permissions set for user I can now read & write to unit (at last  lol )

See how it goes

Thanks for all your help

Mr Green


Mr Green

Offline

#8 2004-12-20 03:28:56

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: Stuff thats like bugging me ....

i use this

/dev/sda1               /mnt/sda1  vfat rw,users,noauto 0 0

but it helps much more, that i explain some parts instead:

/dev/...   /somewhere/: /somewhere can be anywhere ... except that it must be at least rx to the user that wants to access the drive mounted there (if you cannot enter a directory (not x), you can also not access the things that you mounted inside it)

auto / vfat / ...: some kernels have trouble detecting some of the partitions you might use ... if you know the format of the drive, specify it!

user means: only the user that mounts this is allowed to use it (and umount it | of course, this do not count for root)

users means: one user can mount/umount it and all users can access it (depending on the filesystem also with full permissions)

sync is a very good idea ... however, it will slow things down in some cases (because the sync is done not in the background and you "feel" it)

if you do not have a /dev/sda1 , then you cannot mount/use this drive. (lol ... i know you all know, but i wanted to repeat it) ... depending on the kernel used, you might need to modprobe a module that might be automagically loaded by hotplug elseways --- also remember, that on some newer kernels, usb-storage is not longer under /dev/sdXY but under /dev/udXY


The impossible missions are the only ones which succeed.

Offline

#9 2004-12-20 15:27:05

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Stuff thats like bugging me ....

Thank you for clearing that up  wink

I have sda but not udX (/dev/sda shows up once unit plugged in)

users allows me to mount as a user .... (which I wanted to be able to do )

creating a dir within /mnt/sda1 like for example /superdir (with user permissions)  I can read & write to drive as user....

I tried formating unit but I could only change filesystem type (from vfat to ext2) by using mkfs

emmm now I want to load up a Live Linux boot from usbdrive (woah!)

will keep you posted .....


Mr Green

Offline

#10 2004-12-21 15:34:37

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Stuff thats like bugging me ....

if I watch my syslog (I have it going to vc12) when I plug in my usb stick it says something to the effect of "creating /dev/sda"...
Yeah I don't think I ever bothered to mount mine as a user... I have a feeling it's due to the fact that it's a vfat FS and doesn't store user/group info... therefore defaulting to root only mount is safer...

Offline

#11 2004-12-21 15:44:55

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Stuff thats like bugging me ....

Well I changed fs to ext2 ....

Now I want to create a partition (vfat)  to get live distro to boot from stick  wink

emmm now I think of it I may ln -s to a folder in my home dir just to make things a little easier ....

Phrakture your 75% cool & rising

lol


Mr Green

Offline

#12 2004-12-23 11:10:41

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Stuff thats like bugging me ....

One thing .....

what is in fstab

usbdevfs               /proc/bus/usb usbdevfs  defaults            0      0

should I try usbfs ......????

if so can I have the line of code  tongue

l


Mr Green

Offline

#13 2004-12-23 15:46:17

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Stuff thats like bugging me ....

I think usbfs and usbdevfs are the same thing.....

my fstab line is similar except for the options:

noauto,users,exec,umask=644

Offline

#14 2004-12-23 16:48:05

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Stuff thats like bugging me ....

emmm interesting ....  wink


Mr Green

Offline

Board footer

Powered by FluxBB