LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 12-09-2004, 11:37 AM   #1
tortle
Newbie
 
Registered: Jul 2004
Location: Wisconsin
Distribution: OpenSUSE, SUSE, Slackware
Posts: 22

Rep: Reputation: 15
cdrom Mounted but Non Root User Can't Read


Hello:

Title summarizes the problem. The cd-rom is mounted:

Code:
root@myhost:~# ls -l /mnt/cdrom/
total 90
-rwxr--r--   1 root root    36 1999-01-06 18:53 file1*
-rwxr--r--   1 root root   156 1999-01-06 18:53 file2*
...
But a non-root user can't read from it:

Code:
user1@myhost:~$ ls -l /mnt/cdrom/
/usr/bin/ls: /mnt/cdrom/file1: Permission denied
/usr/bin/ls: /mnt/cdrom/chars: Permission denied
...
Obviously this is a permissions problem. Right? But:
Code:
 root@myhost:~# ls -ld /mnt/
drwxr-xr-x  5 root root 120 2002-03-16 01:34 /mnt//

root@myhost:~# ls -ld /mnt/cdrom/
drwxr--r--  17 root root 26 1999-02-20 14:11 /mnt/cdrom//

root@myhost:~# ls -ld /mnt/cdrom/*
-rwxr--r--   1 root root    36 1999-01-06 18:53 /mnt/cdrom/file1*
-rwxr--r--   1 root root   156 1999-01-06 18:53 /mnt/cdrom/file2*
It looks like 'world' has 'r' down the whole path. So why?
 
Old 12-09-2004, 11:44 AM   #2
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
i think you will need "x" permission on /mnt/cdrom to do "ls" or "cd---"
( use " #chmod 755 /mnt/cdrom " )

egag
 
Old 12-09-2004, 11:56 AM   #3
ringwraith
Senior Member
 
Registered: Sep 2003
Location: Indiana
Distribution: Slackware 15.0
Posts: 1,272

Rep: Reputation: 65
I think egag is right because here is mine:

[12:55:14][user@myhost:~]$ ls -l /mnt
total 18
dr-xr-xr-x 10 root root 2048 2004-11-21 17:10 cdrom
dr-xr-xr-x 6 root root 4096 2004-09-11 11:57 cdrw
drwxr-xr-x 2 root root 4096 2002-03-16 02:34 floppy
drwxr-xr-x 2 root root 4096 2002-03-16 02:34 hd
drwxr-xr-x 2 root root 4096 2004-12-01 21:23 windows
 
Old 12-09-2004, 07:48 PM   #4
tortle
Newbie
 
Registered: Jul 2004
Location: Wisconsin
Distribution: OpenSUSE, SUSE, Slackware
Posts: 22

Original Poster
Rep: Reputation: 15
chmod doesn't seem to work here:

Code:
root@myhost:~# chmod 755 /mnt/cdrom/
chmod: changing permissions of `/mnt/cdrom/': Read-only file system
root@myhost:~# ls -ld /mnt/cdrom/
drwxr--r--  17 root root 26 1999-02-20 14:11 /mnt/cdrom//
 
Old 12-09-2004, 08:07 PM   #5
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
do you have a cd in that drive and mounted it ?
i think you need to unmount it before doing a " chmod " .

else... try " # chmod a +x /mnt/cdrom "

egag
 
Old 12-10-2004, 11:39 AM   #6
tortle
Newbie
 
Registered: Jul 2004
Location: Wisconsin
Distribution: OpenSUSE, SUSE, Slackware
Posts: 22

Original Poster
Rep: Reputation: 15
egag and ringwraith:

Thanks for the replies. I was re-reading the mount man page and I realized that I had mounted the device with:
Code:
mount cdrom
instead of:
Code:
mount /dev/cdrom
I don't know why the first command worked, but it resulted (as you saw) in the filesystem being mounted "rwxr--r--".

After I unmounted the device and re-mounted it with the full device name, it came up mounted "rwxr-xr-x" and all was OK.

I'd like to understand why this happened, but for now at least the problem is solved. Thanks.
 
Old 11-21-2005, 11:35 PM   #7
breezewax
Member
 
Registered: Sep 2004
Location: san diego, ca
Distribution: Slackware 10.2
Posts: 74

Rep: Reputation: 15
sorry for dragging up such an old thread, but hey...

So when I mount /dev/cdrom under root, other users can access the CDROM, but does that mean i'll have to "su" to mount it everytime anyone in my house wants to use the CDROM drive?

thanks! LQ rocks!
 
Old 11-22-2005, 05:33 AM   #8
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64
Posts: 761

Rep: Reputation: 35
Add a line to /etc/fstab, e.g.
Code:
/dev/hdc /mnt/cdrom iso9660,udf noauto,users,ro 0 0
Anyone can then type "mount /mnt/cdrom" to mount the drive, or "umount /mnt/cdrom" to unmount it.
 
  


Reply


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
adding permisssions to cdrom so it can be mounted by a user paul62 Slackware 14 11-09-2004 04:46 PM
Oops- mounted root as read only! Hawklad Debian 4 04-26-2004 05:59 PM
root fs is mounted read only after adding new drive PPaladin Linux - Hardware 0 03-02-2004 10:25 AM
Mounted drives are read only for non-root edawad Linux - Newbie 1 01-11-2004 10:30 PM
root mounted as read only behmjose Linux - Newbie 1 12-16-2003 11:05 PM

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

All times are GMT -5. The time now is 07:33 PM.

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