You are not logged in.

#1 2012-03-15 19:21:39

Vufer
Member
Registered: 2012-03-15
Posts: 8

Can't write to some mounted partition from user

fstab:

/dev/sdb1 /home/vu/11 ext3 rw,user 0 1

cat /proc/mounts

rootfs / rootfs rw 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
/sys /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
/dev /dev devtmpfs rw,nosuid,relatime,size=1030692k,nr_inodes=218496,mode=755 0 0
/run /run tmpfs rw,nosuid,nodev,relatime,mode=755 0 0
/dev/sda2 / ext3 rw,relatime,user_xattr,acl,barrier=1,nodelalloc,data=ordered 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
shm /dev/shm tmpfs rw,nosuid,nodev,relatime 0 0
tmpfs /tmp tmpfs rw,nosuid,nodev,relatime 0 0
/dev/sda1 /home ext4 rw,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
/dev/sda3 /var ext3 rw,relatime,user_xattr,acl,barrier=1,nodelalloc,data=ordered 0 0
/dev/sda6 /boot ext3 rw,relatime,user_xattr,acl,barrier=1,nodelalloc,data=ordered 0 0
/dev/sdb1 /home/vu/11 ext3 rw,nosuid,nodev,noexec,relatime,user_xattr,barrier=1,nodelalloc,data=ordered 0 0

So i cant write anything to sdb6. Only if i am root. Can't understand sad

*sorry, sdb1 smile

Last edited by Vufer (2012-03-15 20:20:59)

Offline

#2 2012-03-15 19:22:59

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Can't write to some mounted partition from user

user defines who can mount it, not who can write to it.

fstab(5) wrote:

user   allow a user to mount

mount(8) wrote:

       user   Allow an ordinary user to mount the filesystem.  The name of the mounting user is written to  mtab  so
              that  he  can unmount the filesystem again.  This option implies the options noexec, nosuid, and nodev
              (unless overridden by subsequent options, as in the option line user,exec,dev,suid).

Offline

#3 2012-03-15 19:23:05

aking9
Member
Registered: 2009-03-30
Posts: 65

Re: Can't write to some mounted partition from user

did you mount it as root?

ls -l /home/vu/

please

Offline

#4 2012-03-15 19:28:52

Vufer
Member
Registered: 2012-03-15
Posts: 8

Re: Can't write to some mounted partition from user

falconindy wrote:

user defines who can mount it, not who can write to it.

fstab(5) wrote:

user   allow a user to mount

mount(8) wrote:

       user   Allow an ordinary user to mount the filesystem.  The name of the mounting user is written to  mtab  so
              that  he  can unmount the filesystem again.  This option implies the options noexec, nosuid, and nodev
              (unless overridden by subsequent options, as in the option line user,exec,dev,suid).

i know it, but.. it second day i'am trying smile

Offline

#5 2012-03-15 19:29:26

Vufer
Member
Registered: 2012-03-15
Posts: 8

Re: Can't write to some mounted partition from user

aking9 wrote:

did you mount it as root?

ls -l /home/vu/

please

-rw-r--r--  1 vu   users     446237 марта  8 22:30 0_38006_c0959088_XXXL.jpe
-rw-r--r--  1 vu   users     343769 марта 10 19:46 0_e8973_5d9e2d29_XXXL.jpe
drwxr-xr-x  4 root root        4096 марта 15 22:44 11
drwxr-xr-x  3 vu   users       4096 марта  9 09:04 core
drwxr-xr-x  2 vu   users       4096 марта  5 22:41 Desktop
drwxr-xr-x  6 vu   users       4096 марта  8 00:15 Видео
drwxr-xr-x  7 vu   adbusers    4096 марта 14 22:31 Документы
drwxr-xr-x  9 vu   adbusers    4096 марта 13 21:16 Загрузки
drwxrwxr-x 11 vu   adbusers    4096 марта 12 16:54 Книги
drwxr-xr-x 17 vu   adbusers    4096 янв.  20 23:41 Музыка

Offline

#6 2012-03-15 20:26:44

aking9
Member
Registered: 2009-03-30
Posts: 65

Re: Can't write to some mounted partition from user

http://www.tuxfiles.org/linuxhelp/fstab.html

user and nouser These are very useful options. The user option allows normal users to mount the device, whereas nouser lets only the root to mount the device. nouser is the default, which is a major cause of headache for new Linux users. If you're not able to mount your cdrom, floppy, Windows partition, or something else as a normal user, add the user option into /etc/fstab.

Try sudo umount /home/vu/11/
and then mount it as you

Offline

#7 2012-03-15 20:42:17

Vufer
Member
Registered: 2012-03-15
Posts: 8

Re: Can't write to some mounted partition from user

aking9 wrote:

http://www.tuxfiles.org/linuxhelp/fstab.html

user and nouser These are very useful options. The user option allows normal users to mount the device, whereas nouser lets only the root to mount the device. nouser is the default, which is a major cause of headache for new Linux users. If you're not able to mount your cdrom, floppy, Windows partition, or something else as a normal user, add the user option into /etc/fstab.

Try sudo umount /home/vu/11/
and then mount it as you

mounted, but... only can read smile

Offline

#8 2012-03-15 20:45:53

aking9
Member
Registered: 2009-03-30
Posts: 65

Re: Can't write to some mounted partition from user

Do you want this to be just owned by yourself or any user with access to the system?

if just you, a work around would be sudo chown -R vu:users /home/vu/11

if everyone add the sticky bit to the directory

Offline

#9 2012-03-16 00:51:44

phrenchax
Member
From: Glens Falls, NY, USA
Registered: 2010-11-28
Posts: 6

Re: Can't write to some mounted partition from user

It sounds like you are mounted ok, but your user just doesn't have write access to that folder.
You probably want to change either the ownership of the folder and all contents to your user, or the permissions to allow users other than the owner to write.  Both of these can be done graphically in most file managers if you launch your file manager as root...

Offline

#10 2012-03-16 17:12:35

Vufer
Member
Registered: 2012-03-15
Posts: 8

Re: Can't write to some mounted partition from user

hm...  sudo chown -R vu:users /home/vu/11   - and all ok, but...
this is new clear disk in ext3. i mount ntfs partitions to folders owned by root and can read and write to it from user.
Is it so critical to change owner of mount folder before mounting if some linux filesystem used?

Offline

#11 2012-03-17 11:08:42

phrenchax
Member
From: Glens Falls, NY, USA
Registered: 2010-11-28
Posts: 6

Re: Can't write to some mounted partition from user

Try this for troubleshooting:
As root, create a folder in your partition:
# cd /home/vu/11
# mkdir test
Then change the ownership of that folder to your regular user.
Can you now write to the test folder as regular user?

Offline

#12 2012-03-17 12:14:18

Vufer
Member
Registered: 2012-03-15
Posts: 8

Re: Can't write to some mounted partition from user

yes, now it works fine, after chown to folder "11".
thanks for helping, and sorry for my english smile

Offline

Board footer

Powered by FluxBB