LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 10-20-2004, 10:39 PM   #1
r.stiltskin
Member
 
Registered: Oct 2003
Location: USA
Distribution: Xubuntu, Arch
Posts: 231

Rep: Reputation: 31
problem mounting windows partition


In Sarge, with 2.4.26-1 kernel:

I want to have a windows vfat partition available read-only to ordinary users.

I've tried mounting it automatically at boot by an entry in fstab:
/dev/hda9 /mnt/win vfat ro 0 0

and I've tried mounting it explicitly in a terminal:
mount -t vfat /dev/hda9 /mnt/win

Both ways, the permissions for the /win directory and each of the sub-directories and files are listed as:
rwxr--r--

Yet, both ways, it is accessible only to root. Root gets in there just fine, but for ordinary users it's: Permission denied

Why isn't the read permission working?

PS: I tried changing the fstab options entry to defaults instead of ro but it made no difference. The permissions still come up rwxr--r-- and still only root can get open the /mnt/win directory.

Last edited by r.stiltskin; 10-20-2004 at 11:07 PM.
 
Old 10-20-2004, 11:16 PM   #2
secesh
Senior Member
 
Registered: Sep 2004
Location: Savannah, GA
Distribution: Ubuntu, Gentoo, Mythbuntu, ClarkConnect
Posts: 1,154

Rep: Reputation: 47
there are countless posts on this topic... you are looking to change the options by using 'auto' 'umask' or setting a group id...

try searching first
 
Old 10-20-2004, 11:21 PM   #3
fblucher
Member
 
Registered: Oct 2004
Location: Australia
Distribution: NLD 9
Posts: 60

Rep: Reputation: 15
Mount it as a user using the uid= and gid= Set it to something like the uid of nobdy. Still mount it ro but now ordinary users should be able to browse it.

Seeya,
Finn.
 
Old 10-20-2004, 11:37 PM   #4
darthtux
Senior Member
 
Registered: Dec 2001
Location: 35.7480° N, 95.3690° W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070

Rep: Reputation: 47
Put this in /etc/fstab

/dev/hda9 /mnt/win vfat defaults,users,umask=0022 0 0
 
Old 10-21-2004, 01:44 AM   #5
r.stiltskin
Member
 
Registered: Oct 2003
Location: USA
Distribution: Xubuntu, Arch
Posts: 231

Original Poster
Rep: Reputation: 31
Thanks for your answers.

I see, either the ownership has to be set to someone other than root, or the permissions have to be set explicitly, to give access to users.

Mounting it with umask=222 does the trick; that sets permissions to r-xr-xr-x which prevents anybody from writing to that directory.

Also, mounting it as ro, umask=0 works, although it looks wrong since it sets permissions to rwxrwxrwx, but even though it looks like everybody has write access, the ro parameter takes precedence and no writing to the files is permitted.

It was confusing because r--r--r-- permission looked like it should allow reading; I see now that at least r-xr-xr-x (i.e. read & execute permission) is needed to be able to get into a directory.

(darthtux: your umask allows root to write to that directory.)

Last edited by r.stiltskin; 10-21-2004 at 01:46 AM.
 
Old 10-21-2004, 02:59 AM   #6
darthtux
Senior Member
 
Registered: Dec 2001
Location: 35.7480° N, 95.3690° W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070

Rep: Reputation: 47
Quote:
Originally posted by r.stiltskin

(darthtux: your umask allows root to write to that directory.)
Yes, I know. You said in the first post " I want to have a windows vfat partition available read-only to ordinary users." Most of the time people want write access for root.
 
  


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
Mounting Windows partition ZeroIdea Linux - General 6 10-25-2005 01:38 AM
Mounting my windows partition NNP Linux - General 5 08-03-2005 06:59 AM
Problem with mounting windows partition vinayachandra Linux - Newbie 4 01-12-2005 02:43 PM
mounting windows partition acidbreez Linux - Hardware 13 01-19-2004 11:21 AM
mounting a windows partition? codename000 Linux - Newbie 1 04-15-2003 09:27 PM

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

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