LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 05-16-2004, 04:56 PM   #1
guldo
Member
 
Registered: Aug 2003
Location: Morio Cho
Distribution: debian sid
Posts: 124

Rep: Reputation: 15
understanding /etc/fstab


Hello.
Though I searched the forum, I couldn't find answers to this question; maybe it's just too easy...
I think I'm too stupid to understand how mount options work.
I looked at the man pages of mount and fstab, but I cannot understand.
I'd just like to have read/write access, as normal user, to a certain partition.
I tried many combos of rw, default, user, exec, noauto, and the like, with no success.
The user can mount the partition, but cannot write in it, due to permissions.
The partition fs is ext3.

What's the right syntax?

Thank you,

Guldo
 
Old 05-16-2004, 05:15 PM   #2
mbegovic
Member
 
Registered: Nov 2003
Location: Vancouver, Canada
Distribution: Currently FC3
Posts: 342

Rep: Reputation: 30
You change permissions (or modes) with chmod. This:
Code:
chmod 777 files
Gives full permissions to everybody. The three numbers refer to file owner, group, and everybody else. 7 means read-write-execute, 6 means read-write, 5 read-execute, 4 read, 2 write, 1 execute (notice that you simply add the numbers to combine the different permissions).
 
Old 05-16-2004, 05:21 PM   #3
guldo
Member
 
Registered: Aug 2003
Location: Morio Cho
Distribution: debian sid
Posts: 124

Original Poster
Rep: Reputation: 15
Thank you for your reply.
I know I could change permissions using chmod, but I would like to mount the partition in order to let the mounter (user) read/write in it.
I'd have to edit /etc/fstab so that any user could simply do:
mount /this-partition
and have read/write access.
How is this achieved?

Thanks,

Guldo
 
Old 05-16-2004, 08:46 PM   #4
Kristijan
Member
 
Registered: Sep 2003
Location: Melbourne, Australia
Distribution: NetBSD 3.0.1, Slackware 10.1
Posts: 394

Rep: Reputation: 30
What you could try is mounting the partition with the umask option.

Try something like this

Code:
mount -o umask=000 /dev/device /mnt/mount_point
A umask of 000 will give the persmissions rwxrwxrwx to that partition. I usually use an option of 022. Which is rwxr-xr-x. Umask sort of works backwards, 000 = 777, 022 = 755 etc... Play around till you find one which works for you.

Take note that if the parition you are mounting is NTFS, although it can be done, writing to a NTFS parition is somewhat dodgy. Best google around before you start writing to it.

Good Luck

Kristijan
 
Old 05-16-2004, 09:18 PM   #5
guldo
Member
 
Registered: Aug 2003
Location: Morio Cho
Distribution: debian sid
Posts: 124

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Kristijan
What you could try is mounting the partition with the umask option.
I thought the umask option was related to vfat fs; in fact:
Code:
# mount -o umask=000 -t ext3 /dev/hde7 /backup/
mount: wrong fs type, bad option, bad superblock on /dev/hde7,
       or too many mounted file systems
 
Old 05-17-2004, 04:49 PM   #6
guldo
Member
 
Registered: Aug 2003
Location: Morio Cho
Distribution: debian sid
Posts: 124

Original Poster
Rep: Reputation: 15

Could you help me, please?
I have to figure this out...
 
Old 05-23-2004, 02:58 PM   #7
guldo
Member
 
Registered: Aug 2003
Location: Morio Cho
Distribution: debian sid
Posts: 124

Original Poster
Rep: Reputation: 15
up
 
Old 05-23-2004, 04:28 PM   #8
moby
Member
 
Registered: May 2004
Location: Austria
Posts: 30

Rep: Reputation: 15
I could be wrong, but at the mount point directory you can also chmod the permission of the access.
 
Old 05-23-2004, 04:43 PM   #9
guldo
Member
 
Registered: Aug 2003
Location: Morio Cho
Distribution: debian sid
Posts: 124

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by moby
I could be wrong, but at the mount point directory you can also chmod the permission of the access.
And I did.
I created the mountpoint as an ordinary directory, owned by the no-root user.
As this no-root user mounts it, its owner becomes root, and the user cannot write into it.

Why?

Thanks,

Guldo
 
  


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
fstab problem: mount: can't find dvd in /etc/fstab or /etc/mtab Nikon01 Slackware 5 11-17-2006 06:15 AM
understanding file "etc/fstab" faezeh Fedora 6 03-22-2005 11:40 AM
newbie vs fstab. fstab wins :( blop Linux - Newbie 3 01-07-2005 05:54 AM
(version 5.1 chapter 08 fstab) vs (man fstab) rgiggs Linux From Scratch 2 06-03-2004 05:55 PM
A better understanding! nny0000 Slackware 1 04-14-2004 12:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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