LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 06-01-2009, 07:27 AM   #1
PMP
Member
 
Registered: Apr 2009
Location: ~
Distribution: RHEL, Fedora
Posts: 381

Rep: Reputation: 58
USB Mount and copy


I am trying a normal user to mount a usb on linux box, I have given sudo permission to the normal user for mount, umount and modprobe.

Everything works as expected the normal user is able to mount the device but when i try to copy some file to the usb it says permission denied because the mount directory has permission 755 with owner and group "root".

Ho can i make this thing work.
 
Old 06-01-2009, 08:47 AM   #2
archShade
Member
 
Registered: Mar 2006
Location: Delft NL
Distribution: Debian; Slackware; windows 7
Posts: 218

Rep: Reputation: 53
Is there an fstab entry for the stick. In which case you need to add user or owner options to it.

Or you can put in the options when you mount using mount -o <then options separated by a comma(,)>


man mount has exact details on mount options
man fstab has details on fstab

a google search will uncover more details (or at least clearer details w/ examples) on both.
 
Old 06-01-2009, 08:53 AM   #3
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,628

Rep: Reputation: Disabled
The thing is the directory on which you are mounting the usb drive does not have write permissions for normal user. You will need to give permissions to the normal user to write into the directory.
Like if you do this:

sudo mount /dev/sdb1 /mnt/usb

Then /mnt/usb directory should have write permissions for the normal user. Keep in mind that you are just mounting the drive as root. All the other subsequent commands are run as a normal user.
 
Old 06-01-2009, 09:08 AM   #4
PMP
Member
 
Registered: Apr 2009
Location: ~
Distribution: RHEL, Fedora
Posts: 381

Original Poster
Rep: Reputation: 58
The mount -o option is not working i dont want to add an entry to fstab.

For the second post the mount point has the permission root root hence i cannot change the permission of that mount point with a normal user
 
Old 06-01-2009, 09:51 AM   #5
rikxik
Member
 
Registered: Dec 2007
Posts: 88

Rep: Reputation: 19
Try somthing like this:

mount -o umask=000 /dev/sdb1 /mnt/usbdrive

Or you can also use uid. Suppose, your uid (output of "id -u" command) is 110, then the mount command will be:

mount -o uid=110 /dev/sdb1 /mnt/usbdrive
 
  


Reply

Tags
mount, permission, usb


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to copy data to new mount point mistrm2 Linux - Enterprise 2 10-15-2007 04:51 PM
copy on mount stalled husrah Linux - Newbie 2 08-29-2006 04:00 PM
Mount hdd unable to copy to it windowsrefugeeX Linux - Software 2 02-01-2005 06:51 PM
Can't mount CDROM after sys copy to new HD muadib Linux - Hardware 0 09-22-2004 02:12 PM
mount usb module then mount usb hard drive guanyu Linux - Hardware 1 10-08-2003 12:50 PM


All times are GMT -5. The time now is 01:07 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