Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
I have dual boot setup and want allow linux side user access to a fat32 directory at root i did: root# chown -R user mnt/win_c/My\ Documents/ [root]# chown -R user ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Jan 2005
    Posts
    146

    chown problem: chnging dir ownership


    I have dual boot setup and want allow linux side user access to a fat32 directory
    at root i did:
    root# chown -R user mnt/win_c/My\ Documents/
    [root]# chown -R user mnt/win_c/My\ Documents/
    chown: changing ownership of `mnt/win_c/My Documents/': Operation not permitted
    any answers why that doesn't work??????

  2. #2
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,414
    I don't think you can use chown on a FAT32 partition (maybe I'm wrong on that). If you mount the partition in linux with umask=000, then that's equivalent to performing chmod 777 on the entire partition.

    This should allow you complete access from linux.
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

  3. #3
    Linux Guru sdousley's Avatar
    Join Date
    Feb 2004
    Posts
    1,790

    Re: chown problem: chnging dir ownership

    Quote Originally Posted by Dalani
    I have dual boot setup and want allow linux side user access to a fat32 directory
    at root i did:
    root# chown -R user mnt/win_c/My\ Documents/
    [root]# chown -R user mnt/win_c/My\ Documents/
    chown: changing ownership of `mnt/win_c/My Documents/': Operation not permitted
    any answers why that doesn't work??????
    to set the user and group and permissions if FAT32, it's best to add a relevent line to the fstab.

    something like:

    Code:
    /dev/hda2 /mnt/win/d vfat umask=0222,dmask=0000,uid=0002,gid=users,users 0 0
    allows me to read and write to the fat32 device when it's mounted.
    An explanation as to what the options mean:
    umask=0222 - set the file permissions to 555 (-r-xr-xr-x)
    dmask=0000 - set the folder permissions to 777 (-rwxrwxrwx)
    uid=0002 - set the userid to 0002 (u might wanna change this to another user, but this is what i got mine set to)
    gid=users - sets the group owner to "users"
    users - allows members of the users group to mount the partition.
    "I am not an alcoholic, alcoholics go to meetings"
    Registered Linux user = #372327

  4. #4
    Linux Newbie
    Join Date
    Jan 2005
    Posts
    146
    Thanks for the answers. I'll give it a try.

  5. #5
    Linux Newbie
    Join Date
    Jan 2005
    Posts
    146
    I edited the fstab file with umask=0222 and got a 'read only filesystem' message after reboot when I tried to access a file in the directory.

    So I set umask=0 instead and that worked!!

    I can move,delete and edit the files in that directory as user except OpenOffice still opens these files as read only. ??? The whole point was to allow a Ooo user to access documents from a windows partition. Could it be a OpenOffice software issue?

    BTW dsmeg shows that the directory as edited in fstab does not exist which means the dir name(shown below) is spelt wrong. How does one show a space in a dir/file name in VIM??

    any help would be appreciated. .

    Code:
    /dev/hda1 /mnt/win_c/&#91;u&#93;My<space>Documents&#91;/u&#93; vfat umask=0,dmask=0000,uid=501,gid=users,users 0 0

  6. #6
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,414
    Code:
    My\ Documents
    will do it.
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

  7. #7
    Linux Newbie
    Join Date
    Jan 2005
    Posts
    146
    Linux rejected 'My\ Documents' as bad syntax at boot up with a error at line 12 message. I tried My<space>Documents which produces a 'directory does not exist' message at boot. Thanks anyways I guess i'll sift through the vim docs ...

  8. #8
    Linux Guru sdousley's Avatar
    Join Date
    Feb 2004
    Posts
    1,790
    maybe try putting it in quotes like:

    Code:
    /dev/hda1 /mnt/win_c/"My Documents" vfat umask=0,dmask=0000,uid=501,gid=users,users 0 0
    or why not remant the folder to:

    MyDocuments (or something else without spaces)?
    "I am not an alcoholic, alcoholics go to meetings"
    Registered Linux user = #372327

  9. #9
    Linux Newbie
    Join Date
    Jan 2005
    Posts
    146
    Doesn't work. Vim highlights the whole line when quotes (single or double) enclose a filename with a blank space AND dmseg shows an error at boot-up. I'm not a programmer so I can't be expected to know bash shell script syntax. I just want to access my documents from Linux applications. Thus neither none allow me full privileges to the FAT32 partition folder.

    and why doesn't chown work? At this point I would be reluctant to fully implement Linux on my dual boot (or my place of work) if a simple access to a folder is problematic. Linux gurus are you listening??

  10. #10
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,414
    Like sdousley said, just rename the folder to something without a space. You're not mounting just the My Documents folder, you're mounting the entire /dev/hda1 partition, so you can call the folder you're mounting it to whatever you want.

    The ownership is set in the fstab. The fat32 filesystem doesn't support (I think) regular linux style ownership and permissions, so chown and chmod won't work. If you write the fstab properly then everyone will have read and write permissions, and everyone is happy.

    (BTW I think you need to have umask=000 in that fstab entry -- that might solve the OpenOffice problem)
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •