LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 11-08-2009, 11:21 AM   #1
milomak
Member
 
Registered: May 2009
Posts: 90

Rep: Reputation: 17
Mounting of USB sticks (not formatted as FAT32/NTFS)


I mostly format them as FAT32 or NTFS. So when I insert them, most DEs will pop up a box to mount the volume (or can be done from a file manager directly). In any event the normal user can read/write.

I've noticed that when the stick is formatted as ext3/4, reiserfs etc, that read/write is possible only as root.

I realise one of the options would be to add an entry in fstab, but I think this would remove the ability for all sticks to be mounted as /media/<format label>. What other options are there?
 
Old 11-08-2009, 01:36 PM   #2
Mr-Bisquit
Member
 
Registered: Feb 2009
Distribution: FreeBSD, OpenBSD, NetBSD, Debian, Fedora
Posts: 770
Blog Entries: 52

Rep: Reputation: 68
When you mount the disk again, set permissions to 0666.
Code:
# chmod 0666 /path/to/dev/usbstick
 
Old 11-09-2009, 12:28 AM   #3
j1alu
Member
 
Registered: Apr 2009
Distribution: debian gnu/linux
Posts: 798

Rep: Reputation: Disabled
Quote:
I've noticed that when the stick is formatted as ext3/4, reiserfs etc, that read/write is possible only as root.
i aint got that problem. but my wm (e17, fluxbox...) doesnt do automounting the way you described (might be one may set it that way, for me it doesnt).

therefor i dont think much about it an am not that sure bout the following "internals" of mounting:
user is member of plugdev?
you have tried pmount?
have you tried mounting it in the users /home-directory?
making an entry in fstab, commenting it out and mounting the ext3/ext4 usb-stick after uncommenting the line with mount -a would be an option/possible at all?

for following posts you might tell which OS and which window-manager/desktop-environment you are using.
 
Old 11-09-2009, 12:21 PM   #4
milomak
Member
 
Registered: May 2009
Posts: 90

Original Poster
Rep: Reputation: 17
The usb stick was formatted with: mkfs.ext4 -L label /dev/sdd (tried it both in Fedora and Arch Linux)

I've tried on:

Laptop - Debian Sid (32-bit) and Gnome (Automount)
Desktop - Debian Sid (64-bit) and KDE (Click the File Manager icons that appears)
Desktop - Arch Linux (64-bit) and KDE (Click the File Manager icons that appears)
Desktop - Fedora 12 Beta (64-bit) and KDE (Click the File Manager icons that appears)
MythTV - Debian Testing (32-bit) and Gnome (Automount)

In all of them, after it mounts, a non-root user cannot write to it. And cannot read files that are copied onto the stick by root.

chmod 0666 /dev/device did not work.
 
Old 11-09-2009, 12:28 PM   #5
DavidMcCann
Senior Member
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Salix
Posts: 2,824

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
I use ext2 (not ext3) with no trouble and no fstab entry. But previously, when I used the default MS formating, I often had a read-only mount occurring: this was always due to some fault having developed in the filing system. So, try fsck and see if that helps.
 
Old 11-09-2009, 02:06 PM   #6
milomak
Member
 
Registered: May 2009
Posts: 90

Original Poster
Rep: Reputation: 17
i doubt very much its an fsck related thing, as this will happen as soon after i have formatted the stick.
 
Old 11-10-2009, 09:23 AM   #7
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.1 (multilib)
Posts: 1,209

Rep: Reputation: 55
I have the same issue using ext3 formatted usb drives.

What I generally do is create folders as root on the usb drive and chown or chmod them to allow the user to write to the folder.

I guess that there would be another way around it using a udev rule to mount the drive to a specific folder but I have not tried that.
 
Old 11-10-2009, 05:35 PM   #8
lewc
Member
 
Registered: Nov 2009
Distribution: Gentoo, Slackware or Debian
Posts: 60
Blog Entries: 1

Rep: Reputation: 18
content removed

Last edited by lewc; 11-27-2009 at 03:55 PM.
 
Old 11-12-2009, 02:34 PM   #9
milomak
Member
 
Registered: May 2009
Posts: 90

Original Poster
Rep: Reputation: 17
you did see that the same problem happens in Arch and Fedora 12 right?
 
Old 11-12-2009, 05:32 PM   #10
lewc
Member
 
Registered: Nov 2009
Distribution: Gentoo, Slackware or Debian
Posts: 60
Blog Entries: 1

Rep: Reputation: 18
content removed

Last edited by lewc; 11-27-2009 at 03:55 PM.
 
Old 11-13-2009, 01:35 PM   #11
milomak
Member
 
Registered: May 2009
Posts: 90

Original Poster
Rep: Reputation: 17
glad i could be of assistance. if you pay for travel costs, food and lodging you can gladly have me around with you all day.

You may also be happy to learn that the same thing is happening when using OpenSuse 11.2
 
Old 11-13-2009, 02:40 PM   #12
lewc
Member
 
Registered: Nov 2009
Distribution: Gentoo, Slackware or Debian
Posts: 60
Blog Entries: 1

Rep: Reputation: 18
content removed

Last edited by lewc; 11-27-2009 at 03:55 PM.
 
Old 11-14-2009, 06:47 AM   #13
milomak
Member
 
Registered: May 2009
Posts: 90

Original Poster
Rep: Reputation: 17
Now I like to consider myself as an accomodating kind of guy. So i thought I would go looking for this LiveCD for the distro called "in a god damn". I trawled the internet without much luck. So eventually I settled on a PCLinuxOS LXDE LiveCD (I hope this will not be an issue for you).

So I put that stick in. Fired up the LXDE file mananger (pcmanfm). It recognised it. Clicked on it. It showed the files on the stick. Tried to copy a file onto it. No go.

So then I did the following while in the LiveCD environment

[root@localhost guest]# mkfs.ext3 /dev/sdd -L euroTEK
Code:
mke2fs 1.41.6 (30-May-2009)
/dev/sdd is entire device, not just one partition!
Proceed anyway? (y,n) y
Filesystem label=euroTEK
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
62976 inodes, 251904 blocks
12595 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=260046848
8 block groups
32768 blocks per group, 32768 fragments per group
7872 inodes per group
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376

Writing inode tables: done                            
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 20 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[root@localhost guest]# exit
[guest@localhost ~]$ cd /media/euroTEK/
[guest@localhost euroTEK]$ echo "Test" > test.txt
Quote:
bash: test.txt: Permission denied
[guest@localhost euroTEK]$ uname -a
Quote:
Linux localhost 2.6.26.8.tex3 #1 SMP Mon Jan 12 04:33:38 CST 2009 i686
Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz GNU/Linux
[guest@localhost euroTEK]$ ls
Quote:
lost+found/
 
Old 11-14-2009, 08:30 AM   #14
lewc
Member
 
Registered: Nov 2009
Distribution: Gentoo, Slackware or Debian
Posts: 60
Blog Entries: 1

Rep: Reputation: 18
content removed

Last edited by lewc; 11-27-2009 at 03:56 PM.
 
Old 11-14-2009, 12:38 PM   #15
tredegar
Guru
 
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 6,007

Rep: Reputation: 366Reputation: 366Reputation: 366Reputation: 366
My ext3 USB disk automounts just fine. It always has done, with every distro I've used.

Quote:
The usb stick was formatted with: mkfs.ext4 -L label /dev/sdd
This is a strange way to format a linux disk. And your choice of label is bad - it might not always be /dev/sdd so use a better label like Disgo or USB16GB to avoid future confusion.

You really should partition it first with fdisk /dev/sdwhatever , make one partition, using the whole disk space if you like.

Then format it: mkfs.ext4 -L label /dev/sdwhatever1

Windows (FAT32 / ntfs) doesn't seem to mind if the disk is partitioned or not. Linux does.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NTFS -> FAT32 mounting help adds2one Slackware 5 09-20-2005 02:07 PM
Trouble mounting FAT32 and NTFS under SuSE 9.2 nitroid Suse/Novell 2 12-07-2004 08:55 AM
Mounting NTFS & FAT32 DJWS Linux - Newbie 10 06-21-2004 06:55 AM
Mounting and reading NTFS and FAT32 patitions Forezt Linux - Software 10 02-25-2004 01:19 PM
Mounting different usb-sticks robertmarkbram Linux - Hardware 3 10-22-2003 07:16 AM


All times are GMT -5. The time now is 05:01 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration