You are not logged in.

#1 2009-04-08 21:26:24

Xi0N
Member
From: Bilbao - Spain
Registered: 2007-11-29
Posts: 832
Website

Some help needed with fstab

I just attached a new disk to my machine, so i can use its 80 gb for my mp3 library.
I want to have full access to all the disk and read/write permissions for all the users in the system.
As root, i created the directory /media/Music

I edited fstab like this:

UUID=5a87c116-3e2f-4cd8-825a-18adc82651fa /media/Music ext4 users,defaults 0 1

But i still cannot write anything to the disk as normal user.
Before going on, i want to ask if there is a problem because i created the /media/Music folder as root, and the permissions are drwxr-xr-x with root as owner or if the problem remains in the fstab configuration.


Im also trying to mount a ntfs partition on demand, so i added this line to fstab as well:

UUID=747C1C797C1C37F6 /media/XP ntfs-3g users,uid=1000,gid=100,fmask=0113,dmask=0002,noauto 0 0

I want read/write support once i mount it... but i get an error message about privileges.....

Thanks!

Last edited by Xi0N (2009-04-08 21:35:51)

Offline

#2 2009-04-08 21:30:04

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Re: Some help needed with fstab

Xi0N wrote:

Before going on, i want to ask if there is a problem because i created the /media/Music folder as root

Yep... chown it to your user:group you want to own it, then mount it and you should be good to go.  Example: user name is willy and group is willy::

# chown willy:willy /media/Music

Last edited by graysky (2009-04-08 21:30:31)

Offline

#3 2009-04-08 21:46:07

Xi0N
Member
From: Bilbao - Spain
Registered: 2007-11-29
Posts: 832
Website

Re: Some help needed with fstab

graysky wrote:
Xi0N wrote:

Before going on, i want to ask if there is a problem because i created the /media/Music folder as root

Yep... chown it to your user:group you want to own it, then mount it and you should be good to go.  Example: user name is willy and group is willy::

# chown willy:willy /media/Music

is the -R option needed in this situation?
Also, i want to make sure that the fstab string about this partition is correct, is it?

About the ntfs partition, i have to automount it for getting all the privileges i want, but i dont want to mount it on every bootup....

Thanks

Offline

#4 2009-04-08 23:28:27

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Re: Some help needed with fstab

I don't think you'll need -R since you're defining the permissions on the mount point which dictates the permissions for whatever you're mounting under it.  If you define it in the /etc/fstab then it will mount at boot.  You can use a simple script to mount it at will:

sudo mount -t ntfs-3g /dev/sdxx /media/Music

Offline

#5 2009-04-09 00:19:17

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: Some help needed with fstab

Also - your initial fstab line is in error (inadvertantly) because you have "users,default" instead of "default,users".
A later option overwrites an earlier one - and 'default' means (amongst other things) 'nouser(s)'.
You always put 'default' first and then modify it with later entries.

My 2c-worth

Offline

#6 2009-04-09 07:01:33

Xi0N
Member
From: Bilbao - Spain
Registered: 2007-11-29
Posts: 832
Website

Re: Some help needed with fstab

Thanks for the tip smile

Offline

#7 2009-04-09 15:17:10

beretta
Member
Registered: 2008-04-21
Posts: 133

Re: Some help needed with fstab

Also, i want to make sure that the fstab string about this partition is correct, is it?

I'm assuming you're meaning the UUID?  You can always look at

$ ls -l /dev/disk/by-uuid

and look for the UUID you've put in fstab, make sure it's symlinked to the right device.  As I understand it, those codes are unique to the drive (and change if you reformat it), so there's no way to know off hand if you've got it in correctly.

If that's not what you meant, then everything else looks right, excepting the users,defaults issue perbh pointed out.

Last edited by beretta (2009-04-09 15:17:58)

Offline

Board footer

Powered by FluxBB