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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
11-08-2009, 11:21 AM
|
#1
|
|
Member
Registered: May 2009
Posts: 86
Rep:
|
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?
|
|
|
|
11-08-2009, 01:36 PM
|
#2
|
|
Member
Registered: Feb 2009
Distribution: FreeBSD, OpenBSD, NetBSD, Debian, Fedora
Posts: 770
Rep:
|
When you mount the disk again, set permissions to 0666.
Code:
# chmod 0666 /path/to/dev/usbstick
|
|
|
|
11-09-2009, 12:28 AM
|
#3
|
|
Member
Registered: Apr 2009
Distribution: debian gnu/linux
Posts: 798
Rep: 
|
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.
|
|
|
|
11-09-2009, 12:21 PM
|
#4
|
|
Member
Registered: May 2009
Posts: 86
Original Poster
Rep:
|
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.
|
|
|
|
11-09-2009, 12:28 PM
|
#5
|
|
Senior Member
Registered: Jul 2006
Location: London
Distribution: CentOS, Salix
Posts: 2,285
|
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.
|
|
|
|
11-09-2009, 02:06 PM
|
#6
|
|
Member
Registered: May 2009
Posts: 86
Original Poster
Rep:
|
i doubt very much its an fsck related thing, as this will happen as soon after i have formatted the stick.
|
|
|
|
11-10-2009, 09:23 AM
|
#7
|
|
Senior Member
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.0 (multilib)
Posts: 1,165
Rep:
|
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.
|
|
|
|
11-10-2009, 05:35 PM
|
#8
|
|
Member
Registered: Nov 2009
Distribution: Gentoo, Slackware or Debian
Posts: 60
Rep:
|
content removed
Last edited by lewc; 11-27-2009 at 03:55 PM.
|
|
|
|
11-12-2009, 02:34 PM
|
#9
|
|
Member
Registered: May 2009
Posts: 86
Original Poster
Rep:
|
you did see that the same problem happens in Arch and Fedora 12 right?
|
|
|
|
11-12-2009, 05:32 PM
|
#10
|
|
Member
Registered: Nov 2009
Distribution: Gentoo, Slackware or Debian
Posts: 60
Rep:
|
content removed
Last edited by lewc; 11-27-2009 at 03:55 PM.
|
|
|
|
11-13-2009, 01:35 PM
|
#11
|
|
Member
Registered: May 2009
Posts: 86
Original Poster
Rep:
|
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
|
|
|
|
11-13-2009, 02:40 PM
|
#12
|
|
Member
Registered: Nov 2009
Distribution: Gentoo, Slackware or Debian
Posts: 60
Rep:
|
content removed
Last edited by lewc; 11-27-2009 at 03:55 PM.
|
|
|
|
11-14-2009, 06:47 AM
|
#13
|
|
Member
Registered: May 2009
Posts: 86
Original Poster
Rep:
|
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
|
|
|
|
11-14-2009, 08:30 AM
|
#14
|
|
Member
Registered: Nov 2009
Distribution: Gentoo, Slackware or Debian
Posts: 60
Rep:
|
content removed
Last edited by lewc; 11-27-2009 at 03:56 PM.
|
|
|
|
11-14-2009, 12:38 PM
|
#15
|
|
Guru
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 6,002
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 03:07 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|