You are not logged in.

#1 2012-10-11 22:24:09

achilles
Member
Registered: 2011-09-14
Posts: 9

[Solved] Write problem to ext4 with normal user

Hi !

Before i post that topic i did a lot of research on internet.I used chmod,chown commands and changed fstab according to arch wiki but every time i failed ! I want to mount /dev/sdxX /media/storage .There is one thing i couldn't understand i am creating a file (/media/storage) and i am taking its ownership and i am editing fstab according to it but when i rebooted the system root taking ownership from me even in /home , my home hmm

If you are expert about this please tell me what is the solution ? I don't want to try other ways just want a solution !

Thanks , by the way sorry for "low level english" hmm

Last edited by achilles (2012-10-12 19:21:36)

Offline

#2 2012-10-11 22:30:23

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Write problem to ext4 with normal user

/media/storage is just a mountpoint. What is the problem, you cannot mount as a user or you can mount but not write to?
Pleas post your fstab, the output of 'mount | column -t' with /dev/sdxX mounted on /media/storage and some more info about what do you think is wrong with /home.

Offline

#3 2012-10-11 22:49:19

achilles
Member
Registered: 2011-09-14
Posts: 9

Re: [Solved] Write problem to ext4 with normal user

I can mount /dev/sda4 to /media/storage but only root can write to /media/storage that is the problem.Normally , files in home must be mine if didn't create it with root.I am creating a file instead of /media/storage in home with normal user account ( just a try for see what is happening)  but after rebooted root taking the ownership of the file i created in  home

/etc/fstab

/dev/sda4        /media/storage        ext4       rw,relatime,users    0 0

mount | column -t

proc              on  /proc                     type  proc                   (rw,nosuid,nodev,noexec,relatime)
sys               on  /sys                      type  sysfs                  (rw,nosuid,nodev,noexec,relatime)
dev               on  /dev                      type  devtmpfs               (rw,nosuid,relatime,size=1978164k,nr_inodes=494541,mode=755)
run               on  /run                      type  tmpfs                  (rw,nosuid,nodev,relatime,mode=755)
/dev/sda2         on  /                         type  ext4                   (rw,relatime,data=ordered)
devpts            on  /dev/pts                  type  devpts                 (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
shm               on  /dev/shm                  type  tmpfs                  (rw,nosuid,nodev,relatime)
tmpfs             on  /tmp                      type  tmpfs                  (rw,nosuid,nodev,relatime)
/dev/sda1         on  /boot                     type  ext4                   (rw,relatime,stripe=4,data=ordered)
/dev/sda4         on  /media/storage            type  ext4                   (rw,nosuid,nodev,noexec,relatime,data=ordered)
binfmt            on  /proc/sys/fs/binfmt_misc  type  binfmt_misc            (rw,relatime)
gvfs-fuse-daemon  on  /home/unix/.gvfs          type  fuse.gvfs-fuse-daemon  (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)

Last edited by achilles (2012-10-11 22:51:13)

Offline

#4 2012-10-12 15:25:17

achilles
Member
Registered: 2011-09-14
Posts: 9

Re: [Solved] Write problem to ext4 with normal user

any idea ?

Offline

#5 2012-10-12 18:37:36

johni
Member
Registered: 2012-02-03
Posts: 102

Re: [Solved] Write problem to ext4 with normal user

After mounting try "sudo chown youruser /media/storage".  That should make your user own the root of the mounted filesystem from now on, so you shouldn't have to do that on future mounts of that filesystem.

Offline

#6 2012-10-12 19:21:13

achilles
Member
Registered: 2011-09-14
Posts: 9

Re: [Solved] Write problem to ext4 with normal user

Yes thanks @johni that was the problem ! I was trying to do that thing before i didn't mount /dev/sda4 to /media/storage smile

Offline

Board footer

Powered by FluxBB