LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-22-2004, 01:12 AM   #1
bmarx
Member
 
Registered: Dec 2004
Distribution: Slackware, Arch, FreeBSD
Posts: 202

Rep: Reputation: 34
file access in slackware 10.0


I am having trouble accessing my other ntfs partitions from slackware 10.0 when i am not logged in as root. I can mount and unmount fine as root and view the contents of the folder, but not as another user. Things i have tried:

1. Modify fstab so that the options of the partition i want to be able to mount has:

ro,user

Have also tried "noauto" to see if i could mount after boot, no luck.

2. As root, do a chmod command like so:

chmod +r /hdb5



I am new, but from what i had read, the line in the fstab file would be enough to allow a user to mount and unmount a logical drive. Please point out what i am doing wrong, or point out where in the documentation i fouled up. Thanks.
 
Old 12-22-2004, 01:20 AM   #2
whipermr5
Member
 
Registered: Dec 2004
Location: Singapore
Distribution: Fedora Core 5 Linux
Posts: 202

Rep: Reputation: 30
"chmod +r /hdb5" is not enough. It only lets other users read the dir, not write it. Try reading the chmod man page.
 
Old 12-22-2004, 02:13 AM   #3
bmarx
Member
 
Registered: Dec 2004
Distribution: Slackware, Arch, FreeBSD
Posts: 202

Original Poster
Rep: Reputation: 34
But i do not want to be able to write to the drive. I have read that writing to ntfs is at best experimental.

The problem is that i can not even view the files, or mount the drive when i am not logged in as root.
 
Old 12-22-2004, 02:26 AM   #4
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
Post your fstab
 
Old 12-22-2004, 03:01 AM   #5
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
Well gotta run, so figured I'd post this for you before I went. If you want the partition mounted at startup and any user to be able to access the files, then use something like this:
Code:
/dev/hdb5     /mountpoint     ntfs     umask=000,auto,nouser,async,ro     1   0
That will automount the parition at /mountpoint (change to where ever you want it mounted). The umask=000 is what allows other users besides root to access the files.


If you'd rather it not be mounted automatically and instead want users to be able to mount it themselves, then use something like this:
Code:
/dev/hdb5     /mountpoint     ntfs     noauto,user,ro     1   0
Now any user can mount it and they will own all the files it contains, as far as linux is concerned.


Keep in mind that if it's already mounted then you'll need to unmount it as root before a user can remount it. See "man mount" for help on what each of the mount options do and "man fstab" for help on what each field is for. You may want to change it a bit, depending on what you want. Like if you want to be able to execute files on the parition then add the "exec" option and etc.


Edit:
BTW, when using mount as a user, specify either the mount point or device ONLY, not both. ie "mount /dev/hdb5" or "mount /mountpoint", but not "mount /dev/hdb5 /mountpoint". The first 2 causes mount to reference /etc/fstab for the options, the 3rd only root can do.

Last edited by DaHammer; 12-22-2004 at 04:13 AM.
 
Old 12-22-2004, 06:14 AM   #6
whipermr5
Member
 
Registered: Dec 2004
Location: Singapore
Distribution: Fedora Core 5 Linux
Posts: 202

Rep: Reputation: 30
Quote:
But i do not want to be able to write to the drive. I have read that writing to ntfs is at best experimental.

The problem is that i can not even view the files, or mount the drive when i am not logged in as root.

In order to mount the drive, you must enable write support. If you specified in the kernel, you will still not be able to write to that drive, even though the permissions are OK.

Last edited by whipermr5; 12-22-2004 at 06:27 AM.
 
Old 12-22-2004, 11:25 PM   #7
bmarx
Member
 
Registered: Dec 2004
Distribution: Slackware, Arch, FreeBSD
Posts: 202

Original Poster
Rep: Reputation: 34
well, i am able to mount and umount the drive as an ordinary user, but when i try to cd to it, it says permission denied.


fstab:
/dev/hdb2 swap swap defaults 0 0
/dev/hdb1 / ext2 defaults 1 1
/dev/hdb5 /hdb5 ntfs ro,user 1 0



/hdb5 is the troublesome one


i have not tried putting in defaults for the ntfs partition, and would like to avoid that if at all possible.
 
Old 12-22-2004, 11:37 PM   #8
whipermr5
Member
 
Registered: Dec 2004
Location: Singapore
Distribution: Fedora Core 5 Linux
Posts: 202

Rep: Reputation: 30
I have exactly the same problem too.
 
Old 12-23-2004, 01:17 AM   #9
bmarx
Member
 
Registered: Dec 2004
Distribution: Slackware, Arch, FreeBSD
Posts: 202

Original Poster
Rep: Reputation: 34
ok, i was able to mount and view the files as a non-root user using the "umask=000" option in fstab. From what i understand though, this option allows any user to mount, unmount, read, write, execute files in the directory- not good.

Is there any other way to be able to mount and view/execute files as a non-root user- more specifically, is there a way to pick and choose among different users who can view and execute files? which was part of my original problem.
 
  


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
Slackware 10.2 no network access redjokerx Slackware 25 12-21-2005 01:40 AM
unable to access slackware flebber Slackware 25 08-23-2005 09:17 PM
Isolating read access to only to one file only by another file. jon_k Linux - Software 3 08-14-2004 05:16 AM
Mozilla 1.7 - No File Save / File Open dialogs on Slackware 10.0 jayseye Slackware 8 08-10-2004 05:52 AM
No internet access on Slackware 10.0 hansidm Slackware 3 07-12-2004 07:06 PM


All times are GMT -5. The time now is 11:05 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration