LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 09-17-2003, 06:40 PM   #1
sammckee
Member
 
Registered: Aug 2003
Posts: 59

Rep: Reputation: 15
Question Setting permissions


I have two NTFS drives mounted as win_c and win_d. Only the root user can browse into them. Other users can see them, but they appear empty.

I'm a Linux newbie--hence the posting in the Newbie forum--so I su'ed over to root and typed konqueror /mnt to get to an easy tool. I right-clicked on the win_c directory, selected Permissions, and tried to set it to let everyone show entries and enter. I also clicked the "apply changes to subdirectories" box and clicked OK.

Then it hangs forever. Over in the console window there's a message that says The library kpfpropertiesdialog does not offer an init_kpfpropertiesdialog function.

When I try it on win_d I get the same thing.

All I want is for users to be able to read (not even write!) my Windoze drives without logging in as root.
 
Old 09-17-2003, 07:39 PM   #2
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
You will need to make modifications to /etc/fstab
This example will mount a partition (hda1) as read-only.
Code:
/dev/hda1                /mnt/win_c             ntfs    defaults,user,ro 0 0
Note:
NTFS support is Read-Only.
Do NOT write to NTFS from Linux.
It may corrupt your NTFS filesystem.
 
Old 09-17-2003, 08:53 PM   #3
sammckee
Member
 
Registered: Aug 2003
Posts: 59

Original Poster
Rep: Reputation: 15
Here are the lines from fstab:

/dev/hda1 /mnt/win_c vfat defaults,user,ro 0 0
dev/hda2 /mnt/win_d ntfs defaults,user,ro 0 0


The first drive is a fat32, the other true NTFS, so I think that's right.

Now when I log in as a regular user and do an ls /mnt/win_c I get a list of directories directly under win_c, which is right, and I also get a list of "permision denied" statements pertaining to other files under it. When I try to cd directly into win_c I get a permission denied error. I can still browse the drives as root.

So I went in as root and once again tried to set the permissions, and the whole thing hung forever just like before.
 
Old 09-17-2003, 09:10 PM   #4
Demonbane
Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
try adding umask option then remount them
so

/dev/hda1 /mnt/win_c vfat rw,umask=022 0 0
/dev/hda1 /mnt/win_d ntfs ro,umask=222 0 0

Note it's pretty safe to write to a fat32 partition and its useful sometimes, so might just mount it rw. With the above umask value only root can write to it.
Hope this helps


Last edited by Demonbane; 09-17-2003 at 09:13 PM.
 
Old 09-17-2003, 09:18 PM   #5
sammckee
Member
 
Registered: Aug 2003
Posts: 59

Original Poster
Rep: Reputation: 15
Done. Here's what I then get when I try to list files:

[javaguy@dhcp024-209-106-131 javaguy]$ ls /mnt/win_c
ls: /mnt/win_c/Amber.ico: Permission denied
ls: /mnt/win_c/arcldr.exe: Permission denied
ls: /mnt/win_c/arcsetup.exe: Permission denied
ls: /mnt/win_c/autoexec.bat: Permission denied
ls: /mnt/win_c/Autorun.inf: Permission denied
ls: /mnt/win_c/boot.ini: Permission denied
ls: /mnt/win_c/config.sys: Permission denied
ls: /mnt/win_c/io.sys: Permission denied
ls: /mnt/win_c/msdos.sys: Permission denied
ls: /mnt/win_c/ntdetect.com: Permission denied
ls: /mnt/win_c/ntldr: Permission denied
ls: /mnt/win_c/pagefile.sys: Permission denied
Documents and Settings/ nvidia/ Recycled/
j2sdk1.4.1_03/ Program Files/ winnt/


The win_d drive is still a straight permission denied.
 
Old 09-17-2003, 09:24 PM   #6
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
Can you post your /etc/fstab (all of it).
 
Old 09-18-2003, 12:01 AM   #7
sammckee
Member
 
Registered: Aug 2003
Posts: 59

Original Poster
Rep: Reputation: 15
/dev/hdb1 / ext2 noatime 1 1
none /dev/pts devpts mode=0620 0 0
/dev/scd0 /mnt/cdrom auto user,iocharset=iso8859-1,codepage=850,noauto,ro,exec 0 0
/dev/hdd /mnt/cdrom2 auto user,iocharset=iso8859-1,codepage=850,noauto,ro,exec 0 0
/dev/fd0 /mnt/floppy auto user,iocharset=iso8859-1,sync,codepage=850,noauto,exec 0 0
/dev/hda1 /mnt/win_c vfat defaults,user,ro,umask=222 0 0
/dev/hda2 /mnt/win_d ntfs defaults,user,ro,umask=222 0 0
none /proc proc defaults 0 0
/dev/hdb5 swap swap defaults 0 0
 
Old 09-18-2003, 12:38 AM   #8
Demonbane
Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Can you post the output of the "mount" command by itself?
after you mounted the windows partitions that is.
 
Old 09-18-2003, 06:30 AM   #9
Skyline
Senior Member
 
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
Quote:
Here are the lines from fstab:

/dev/hda1 /mnt/win_c vfat defaults,user,ro 0 0
dev/hda2 /mnt/win_d ntfs defaults,user,ro 0 0

The first drive is a fat32, the other true NTFS, so I think that's right.

For FAT32 use :

/dev/hda1 /mnt/win_c vfat defaults,umask=000 0 0


For NTFS use:

/dev/hda2 /mnt/win_d ntfs auto,ro,umask=0222 0 0
 
Old 09-18-2003, 05:01 PM   #10
sammckee
Member
 
Registered: Aug 2003
Posts: 59

Original Poster
Rep: Reputation: 15
Done.

Same result.

 
  


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
Need help setting permissions for a directory imsam Linux - Newbie 6 12-08-2004 10:37 AM
setting permissions Tigger Linux - Security 1 06-09-2003 09:20 AM
Setting Permissions johnnyde Linux - Newbie 1 05-22-2003 04:37 PM
Setting Permissions mythology Slackware 2 12-11-2002 02:14 AM
Setting up permissions rajaram Linux - Newbie 2 12-05-2001 02:55 PM


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

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