Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Desktop Environments
  • Search

Can't use my USB device as normal user [solved]

Problems with GUI applications? Questions about X, KDE, Gnome, Fluxbox, etc.? Come on in. NOTE: For multimedia, go up one forum
Post Reply
Advanced search
12 posts • Page 1 of 1
Author
Message
EnlightedGnome
Tux's lil' helper
Tux's lil' helper
Posts: 126
Joined: Tue Jun 07, 2005 4:23 pm
Location: Denmark, Odense

Can't use my USB device as normal user [solved]

  • Quote

Post by EnlightedGnome » Thu Aug 04, 2005 4:11 pm

I have mounted my extern harddisk on /home/me/backup but when I try to open it as normal user it says: "bash: cd: backup/: Permission denied". Then as root if I try to chmod 1777 backup it tells me: "chmod: changing permissions of 'backup/': Operation not permittet".
What can I do so I can open my extern hdd as a normal user?
Last edited by EnlightedGnome on Fri Aug 05, 2005 2:36 pm, edited 2 times in total.
checking for -lifesign in -Kenny... no
- oh my god, they killed Kenny
Top
azuriel
Apprentice
Apprentice
User avatar
Posts: 166
Joined: Sun Feb 27, 2005 9:14 pm
Contact:
Contact azuriel
Website

  • Quote

Post by azuriel » Thu Aug 04, 2005 4:22 pm

Can you mount the usb drive from your normal user account? Treat it's /etc/fstab entry like a cdrom drive, and check if you're in all the right groups (my gentoo box is off right now, can't check sorry).
Adopt an unanswered post
TJGames.org

The folly of mistaking a torrent of verbiage for a spring of capital truths, and oneself for an oracle, is inborn in us. -Valery
Top
EnlightedGnome
Tux's lil' helper
Tux's lil' helper
Posts: 126
Joined: Tue Jun 07, 2005 4:23 pm
Location: Denmark, Odense

  • Quote

Post by EnlightedGnome » Thu Aug 04, 2005 4:53 pm

what would be the right groups? when i try to mount as normal user it tells me that "only root can do that"
checking for -lifesign in -Kenny... no
- oh my god, they killed Kenny
Top
azuriel
Apprentice
Apprentice
User avatar
Posts: 166
Joined: Sun Feb 27, 2005 9:14 pm
Contact:
Contact azuriel
Website

  • Quote

Post by azuriel » Thu Aug 04, 2005 5:57 pm

Try adding "user" to the fstab entry, so the options are like:

Code: Select all

/dev/sda   /mnt/usbdrive   auto   defaults,user,noauto   0 0
I can post something a bit better when I get back home, if this doesn't work.[
Last edited by azuriel on Thu Aug 04, 2005 6:51 pm, edited 1 time in total.
Adopt an unanswered post
TJGames.org

The folly of mistaking a torrent of verbiage for a spring of capital truths, and oneself for an oracle, is inborn in us. -Valery
Top
mikegpitt
Advocate
Advocate
User avatar
Posts: 3224
Joined: Sat May 22, 2004 6:49 pm

  • Quote

Post by mikegpitt » Thu Aug 04, 2005 6:26 pm

It sounds like you are using udev. Make sure to add your user to the usb group. Group data is stored in /etc/group.
Top
EnlightedGnome
Tux's lil' helper
Tux's lil' helper
Posts: 126
Joined: Tue Jun 07, 2005 4:23 pm
Location: Denmark, Odense

  • Quote

Post by EnlightedGnome » Thu Aug 04, 2005 9:10 pm

azuriel wrote:

Code: Select all

/dev/sda   /mnt/usbdrive   auto   defaults,user,noauto   0 0
it should be /dev/sda1 right? it doesn't mount in eighter case...

@mikegpitt yes I am in the usb group...
checking for -lifesign in -Kenny... no
- oh my god, they killed Kenny
Top
azuriel
Apprentice
Apprentice
User avatar
Posts: 166
Joined: Sun Feb 27, 2005 9:14 pm
Contact:
Contact azuriel
Website

  • Quote

Post by azuriel » Thu Aug 04, 2005 9:31 pm

Um. how are you mounting it right now? error messages would be good too. FYI, the fstab is just a way of remembering mount options and automating the process a little. Make an fstab entry for your usbdrive, and try and mount it as a normal user (thats the point of the user option). Same way you mount a cdrom drive.
Adopt an unanswered post
TJGames.org

The folly of mistaking a torrent of verbiage for a spring of capital truths, and oneself for an oracle, is inborn in us. -Valery
Top
EnlightedGnome
Tux's lil' helper
Tux's lil' helper
Posts: 126
Joined: Tue Jun 07, 2005 4:23 pm
Location: Denmark, Odense

  • Quote

Post by EnlightedGnome » Thu Aug 04, 2005 10:09 pm

Code: Select all

$ mount -t vfat /dev/sda1 /home/me/usb
mount: only root can do that
...
checking for -lifesign in -Kenny... no
- oh my god, they killed Kenny
Top
alsuren
n00b
n00b
Posts: 19
Joined: Sat Feb 26, 2005 12:06 pm
Location: London
Contact:
Contact alsuren
Website

  • Quote

Post by alsuren » Fri Aug 05, 2005 12:31 am

whenever I do things like this, I always test as root first, then put an entry in /etc/fstab so that users can follow my lead (see later for my theory on why)

so I would:

Code: Select all

$ su
# fdisk -l 

^^^this is THE most useful hack I've ever seen.
It lists all the formattable (and therefore mountable) 
disks in your entire system, along with their partition type.
If you don't see your usbdrive there, you probably won't
be able to mount it

# mkdir /mnt/usb
^^^I would always try and keep your temporary mounts 
somewhere within /mnt because then things don't get lost.
If you need permissions, see below

# chmod 775 /mount/usb
# chown alsuren:users /mnt/usb
# mount -t vfat /dev/sda1 /mnt/usb
# ls /mnt/usb
If it works with root, you can do backups etc. that way from the command line. If you can't even list the contents of the drive as root, there's something else wrong so you should post your error messages


If you want user access to a vfat formatted partition(does vfat even store owner/permissions info?), one way to do it (as everyone has said) is to mount it as a user. The only way to do this (that I know of, short of sudo, which is cheating, and will mount it as root anyway) is to add a /etc/fstab entry. This is *probably* because if you let your users mount arbitrary disks at random, you might have security problems at a later date.

Another advantage of having an entry in /etc/fstab is that you can mount it by just typing "mount /mnt/usb" (as user or root) and you don't need to specify the type or device, because it's already in fstab

yet another advantage is in konqueror(though by your name, I have a hunch you might not like this suggestion) you browse to media:/ and it will show up there, so you can mount and browse it without ever going into the command line

Good luck
<alsuren 22:07:55> I thought it was 42
<ladymauv 22:08:19> Maybe it's really 69
Top
djscribble
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 116
Joined: Wed Aug 03, 2005 9:23 pm

  • Quote

Post by djscribble » Fri Aug 05, 2005 3:11 am

the other thing you should check is that the user has permissions to modify the folder in question
Top
azuriel
Apprentice
Apprentice
User avatar
Posts: 166
Joined: Sun Feb 27, 2005 9:14 pm
Contact:
Contact azuriel
Website

  • Quote

Post by azuriel » Fri Aug 05, 2005 2:17 pm

This is the entry I have for an ipod (borrowed it from a friend for a week):

Code: Select all

/dev/ipod       /mnt/ipod       vfat            user,noauto,defaults 0 0
I don't remember if I had problems with it as normal user, but maybe it'll help.
Adopt an unanswered post
TJGames.org

The folly of mistaking a torrent of verbiage for a spring of capital truths, and oneself for an oracle, is inborn in us. -Valery
Top
EnlightedGnome
Tux's lil' helper
Tux's lil' helper
Posts: 126
Joined: Tue Jun 07, 2005 4:23 pm
Location: Denmark, Odense

  • Quote

Post by EnlightedGnome » Fri Aug 05, 2005 2:36 pm

Thank you verry much everyone, it works now :D
How can I make it mount as user at startup?
checking for -lifesign in -Kenny... no
- oh my god, they killed Kenny
Top
Post Reply

12 posts • Page 1 of 1

Return to “Desktop Environments”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic