LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-15-2006, 04:17 PM   #1
Panagiotis_IOA
Member
 
Registered: Jan 2006
Location: Hellas, Europe
Distribution: Slackware 12
Posts: 238

Rep: Reputation: 32
Mounting permissions for simple user


When I'm trying to mount CD-ROM or USB flash-disk I got the message that only root has these permissions. I tried by changing permission at the files: /dev/cdrom and /dev/sda1 (for the flash-disk) but again it didn't work.
Also, I have a FAT32 partition and I can read and write as root but as user I can only read. I tried and here to change the permissions but they don't unfortunately they didn't.

Last edited by Panagiotis_IOA; 03-15-2006 at 04:23 PM.
 
Old 03-15-2006, 06:00 PM   #2
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Post

This is what you need in your /etc/fstab to mount the flash disk read/write as a normal user:
Code:
/dev/sdc1        /mnt/usb         vfat        noauto,user,rw,umask=1000  0  0
Change the device (/dev/sdc1) and mount point (/mnt/usb) and filesystem (vfat) appropriately.


This is what you need to mount your CD-ROM as a normal user (can't mount read/write):
Code:
/dev/hdc         /mnt/cdrw        iso9660     noauto,user,ro   0   0
Change the device (/dev/hdc) and mount point (/mnt/cdrw) appropriately.


This is what you need in your /etc/fstab to mount the FAT32 partition read/write as a normal user:
Code:
/dev/sda2        /Shared          vfat        user,umask=1000,rw,auto  1   0
Change the device (/dev/sda2) and mount point (/Shared) appropriately.


You can make the changes to /etc/fstab as root, then issue "umount /<yourFAT32mount" and then issue "mount /<yourFAT32mount" and it will be mounted read/write. No need to reboot your box.

Neither CD-ROM, CD-RW, DVD-ROM, nor DVD+/-RW can be mounted read/write (rw) because they are all read-only filesystems. You use software to write to medium in these devices such as growisofs, dvd+rw-tools, dvdrtools, and cdrecord. There are also GUI frontends such as K3B which use those command line tools.

For the flash disk, you'll need to know where your system is attaching it. Plug that thing in and wait a few seconds (5 to 30 depending upon your system) then issue and read:
Code:
bruce@silas:~$ dmesg | tail
usb 1-6: reset high speed USB device using ehci_hcd and address 7
usb 1-6: reset high speed USB device using ehci_hcd and address 7
usb 1-6: reset high speed USB device using ehci_hcd and address 7
sdc: Write Protect is off
sdc: Mode Sense: 02 00 00 00
sdc: assuming drive cache: write through
 sdc: sdc1
sd 4:0:0:0: Attached scsi removable disk sdc
sd 4:0:0:0: Attached scsi generic sg2 type 0
usb-storage: device scan complete
That's why I have /dev/sdc1 to mount at /mnt/usb then /dev/sdd1 to mount at /mnt/usb1 just in case I need to use both my flash disks at one time. Notice that I haven't yet mounted the disk, but because of my fstab entry above:
Code:
bruce@silas:~$ mount /mnt/usb && ls -alhn /mnt/usb
total 147M
drwxrwxrwx 2 1001 100 2.0K 1970-01-01 07:00 ./
drwxr-xr-x 8    0   0  192 2006-03-11 17:24 ../
-rwxrwxrwx 1 1001 100  20M 2006-03-13 12:44 AdbeRdr705_enu_full.exe*
-rwxrwxrwx 1 1001 100 5.0M 2006-02-08 17:12 Firefox\ Setup\ 1.5.0.1.exe*
-rwxrwxrwx 1 1001 100  91M 2006-03-13 12:42 OOo_2.0.1_Win32Intel_install_wJRE.exe*
-rwxrwxrwx 1 1001 100 6.1M 2006-03-13 12:41 Thunderbird\ Setup\ 1.5.exe*
-rwxrwxrwx 1 1001 100 4.3M 2006-03-13 02:29 epson10511.exe*
-rwxrwxrwx 1 1001 100 2.0M 2006-03-13 02:39 epson10576.exe*
-rwxrwxrwx 1 1001 100 1.4M 2006-03-13 02:34 epson11667.exe*
-rwxrwxrwx 1 1001 100 6.7M 2006-03-13 12:43 gaim-1.5.0.exe*
-rwxrwxrwx 1 1001 100   65 2006-03-13 13:41 key*
-rwxrwxrwx 1 1001 100 8.5M 2006-03-13 12:41 nentenst.exe*
-rwxrwxrwx 1 1001 100 184K 2006-02-01 03:00 slack1.png*
-rwxrwxrwx 1 1001 100 1.6M 2006-03-13 12:43 xchat-2.6.1a.exe*
I issue two commands at once using "&&" to save time. And then after you're finished with him:
Code:
bruce@silas:~$ umount /mnt/usb
and you can safely unplug him from your system.
 
Old 03-15-2006, 06:36 PM   #3
Panagiotis_IOA
Member
 
Registered: Jan 2006
Location: Hellas, Europe
Distribution: Slackware 12
Posts: 238

Original Poster
Rep: Reputation: 32
Thanks a lot for your reply and the information you gave me. Now, and the three of them are working properly.
After reading your post and you mention about two flashdisks it came to my mind what would I do if I get another one.
I mount the one I have at /dev/sda1 and under the link /mnt/memstick. If I plug a second one will it like /dev/sda2 ?
 
Old 03-15-2006, 06:40 PM   #4
chrisortiz
Member
 
Registered: Nov 2005
Distribution: Slackware, and of course the super delux uber knoppix universal live recovery cd
Posts: 429

Rep: Reputation: 30
Quote:
I mount the one I have at /dev/sda1 and under the link /mnt/memstick. If I plug a second one will it like /dev/sda2 ?
it would be /dev/sbd1
a third drive would be /dev/sbc1
the numbers refer the the partitions on the device and letters refer to the devices
 
Old 03-15-2006, 06:42 PM   #5
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
If you plug in two at the same time it will take the next device. You can make more mount points. Issue "dmesg | tail" to determine which device the kernel gave it. You can also use udev (man udev) to mount devices according to their names you setup in udev rules. However, udev seems to be messy, and this 2.6.x.y kernel is a moving target; so I don't use udev. Perhaps some really smart Slacker will come along and prove me wrong. I'd sure like to just plug devices in and they're there and They Just Work (TM) like in those other, so poorly coded OSes (Mac and Windows).
 
Old 03-15-2006, 06:44 PM   #6
Panagiotis_IOA
Member
 
Registered: Jan 2006
Location: Hellas, Europe
Distribution: Slackware 12
Posts: 238

Original Poster
Rep: Reputation: 32
Ok, thanks a lot! I'll try with a second flashdisk soone or later
 
Old 03-15-2006, 06:45 PM   #7
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Quote:
Originally Posted by chrisortiz
it would be /dev/sbd1
a third drive would be /dev/sbc1
the numbers refer the the partitions on the device and letters refer to the devices
You're close, but incorrect.

It would be:
sda1
sdb1
sdc1
sdd1

It is s (scsi) d (device) a (first device) 1 (partition number).

You could have many partitions on one scsi (or scsi emulated) device.
 
Old 03-15-2006, 06:50 PM   #8
chrisortiz
Member
 
Registered: Nov 2005
Distribution: Slackware, and of course the super delux uber knoppix universal live recovery cd
Posts: 429

Rep: Reputation: 30
oh i had a typo =) thanks for catching it.
 
  


Reply



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
Mounting ext3 partition with rw permissions for non-root user ilyushin Linux - Newbie 5 06-27-2005 07:58 AM
Simple mounting questions spedsta Linux - Newbie 3 05-27-2004 08:07 AM
simple permissions question hollywoodb Linux - Newbie 13 10-16-2003 02:47 PM
simple questions about permissions chrismiceli Linux - General 6 06-15-2003 12:00 PM
Is there a simple way to give all permissions frontier1 Linux - General 3 02-28-2003 08:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:44 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration