Re: USB stick with ext2?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ed Greshko wrote:
> Alan Evans wrote:
>> Howdy!
>>
>> When I insert a USB thumb drive formatted with vfat, it gets
>> automagically mounted under /media with appropriate permissions so the
>> logged in user can write to the device. But if the thumb drive is
>> formatted ext2, only root can write to it.
>>
>> $ mount
>> /dev/sdb1 on /media/Devel type ext2 (rw,nosuid,nodev,uhelper=hal)
>> /dev/sdc1 on /media/disk type vfat
>> (rw,nosuid,nodev,uhelper=hal,shortname=lower,uid=500)
>> $ ll
>> total 20
>> drwxr-xr-x 3 root root  4096 2009-01-05 21:27 Devel
>> drwxr-xr-x 3 alan root 16384 1969-12-31 16:00 disk
>>
>> Is there a way to make that work?
>>
>>
>>   
> With the USB mounted become root....  Then "chown alan /media/disk". 
> The ownership information is maintained in the ext2 structure.  So, the
> next time it is mounted it will retain ownership by alan.
> 
One thing to keep in mind if you do this - if you move the drive to
another machine where the UID and GID for alan are different, you
will not be able to access the drive as alan. The owner/group
settings are the number, not the name, of the user/group.

You may want to use chown alan:alan /media/Devel instead of chown
alan /media/disk. This will set both the owner and group of the
disk. In this case, I would not use the -R option - I do not know
what the affect of changing the ownership of /media/Devel/lost+found
would be.

You also have the option of creating a directory on the USB drive
owned by alan. That way, you could have storage for more then one
user on the drive.

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux