You are not logged in.

#1 2009-03-30 17:03:56

fredspayo
Member
Registered: 2007-11-08
Posts: 14

ext4 and fstab - permissions

hullo.

i formatted my "storage" partition to ext4 and then changed fstab accordingly - by that i mean i changed the mention to ext3 to ext4.

it is correctly mounted at boot but then i can only use it as root since regular users don't have permission to write it - this did not happen before the formatting.

could someone please inform me as to how i might mount it in fstab and have it writable by any (or perhaps a specific) users?

Thanks in advance,
Fred

my fstab:

# 
# /etc/fstab: static file system information
#
# <file system>        <dir>        <type>        <options>                  <dump> <pass>
none                   /dev/pts       devpts        defaults                    0      0
none                   /dev/shm       tmpfs         defaults                    0      0
tmpfs                  /tmp           tmpfs         defaults                    0      0

/dev/cdroms/cdrom0     /mnt/cd         iso9660       ro,user,noauto,unhide       0      0
/dev/cdroms/cdrom0     /mnt/dvd        udf           ro,user,noauto,unhide       0      0
/dev/floppy/0          /mnt/fl         vfat          user,noauto                 0      0

/dev/sda3              Swap           swap          defaults,noatime            0      0
/dev/sda2              /home          ext3          defaults,noatime            0      0
/dev/sda1              /              ext3          defaults,noatime            0      0
/dev/sda4     /media/storage ext4          defaults,noatime        0      0

Offline

#2 2009-03-30 17:15:12

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: ext4 and fstab - permissions

You just need to chown and/or chmod it such that it has the permissions you want.

Offline

#3 2009-03-30 20:25:54

fredspayo
Member
Registered: 2007-11-08
Posts: 14

Re: ext4 and fstab - permissions

thx for the quick reply.

glad to hear it's easy to solve...

it's rather easier said than done, though, since i have no idea what you just told me to do. if you would please elaborate on that...

and... is that something i must do on every restart or is it just once?

and out of curiosity: why did i not have to do that with ext3?

Offline

#4 2009-03-30 23:30:44

JF
Member
From: France
Registered: 2009-03-27
Posts: 39

Re: ext4 and fstab - permissions

Hi, the issue you have is about the filesystem permissions.

When you converted your partition, you did it as root and what root creates only root can modify by default, so you have to give access to others users of your system. This modification is stored on the disk so you don't have to change it at every reboot.

Here is a good presentation of Linux permissions and the way to modify them (with chown and chmod that ataraxia mentionned): http://people.aspenmt.com/~jason/linux/fsperms.html it should help you to determine what permissions you need to give.

Hope it clarifies a bit smile

Offline

#5 2009-03-31 21:43:00

fredspayo
Member
Registered: 2007-11-08
Posts: 14

Re: ext4 and fstab - permissions

salut jf!

merci de ton aide. ça a ete vraiment informatif quoique ça m'a pas permis de resoudre le probleme...

j'ai tout lu, j'aime meme essaye d'utiliser chmod mais il a pas marche:s

j'ai essaye avec

'sudo chmod 0777 /dev/sda4'
'sudo chmod 0777 /media/storage'
'sudo chmod rwx /dev/sda4'
'sudo chmod rwx /media/storage'

n'est ce pas comme ça?

Offline

#6 2009-03-31 21:46:26

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: ext4 and fstab - permissions

"sudo chmod 0777 /media/storage" should be enough all by itself.

Offline

#7 2009-04-01 04:07:23

JF
Member
From: France
Registered: 2009-03-27
Posts: 39

Re: ext4 and fstab - permissions

Salut Fred smile

What doesn't work exactly, do you get an error message ?

With the 'ls -l /media' command you should get about this after having done the chmod:

drwxrwxrwx root root [...] storage

And all the users of your system should be able to write into it.

Offline

#8 2009-04-06 11:59:23

fredspayo
Member
Registered: 2007-11-08
Posts: 14

Re: ext4 and fstab - permissions

hullo!

sorry it took me so long to come back here to thank you guys: i issued the commands yet again and... well i don't exactly know what changed this time but it's all working!

thanks again.

cheers,
Fred

Offline

Board footer

Powered by FluxBB