Find the answer to your Linux question:
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 25
This makes me crazy! Maybe someone can fill me in. I transferred a file from my home directory to a Western Digital external hard drive. When I do, the ownership ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,630

    I am su root and I cannot change ownership??


    This makes me crazy! Maybe someone can fill me in. I transferred a file from my home directory to a Western Digital external hard drive. When I do, the ownership of the file is automatically changed to root. The "group is also changed to root. I want to change this file's ownership so I can use it as a regular user. So as root I go:
    Code:
     chown -R dapperdan:users file_in_question
    But I'm not allowed to change this file's ownership even though I'm root! If root can't change the ownership of a file, then who can???

    Any help appreciated.

    Dapper
    Linux Mint + IceWM Registered: #371367 New Members: click here

  2. #2
    Linux Guru dylunio's Avatar
    Join Date
    Aug 2004
    Location
    Cymru
    Posts
    4,157
    I doubt this will help, but have you tried su with the hyphen to substitute the user?
    Code:
    su -
    [rootpw]
    chown -R dapperdan:users file_in_question
    Registered Linux User #371543!
    Get force-get May The Source Be With You
    /dev/null
    /dev/null2

  3. #3
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,630
    Thanks dylunio for responding, but I'm afraid that doesn't work either. This is nuts! If root can't change ownership of a file, then what must be done to change it??

    Linux Mint + IceWM Registered: #371367 New Members: click here

  4. #4
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    If you haven't done so already, you might try adding "user" or "users" to the fstab entry for the external drive so that it can be mounted as user.

  5. #5
    Linux Engineer
    Join Date
    Apr 2005
    Location
    Belgium
    Posts
    1,429
    With Ozar. Maybe the real problem is you don't have write access to the drive or partition.
    ** Registered Linux User # 393717 and proud of it ** Check out www.zenwalk.org
    ** Zenwalk 2.8 - Xfce 4.4 beta 2- 2.6.17.6 kernel = Slack on steroids! **

  6. #6
    scm
    scm is offline
    Linux Engineer
    Join Date
    Feb 2005
    Posts
    1,044
    How is the external drive mounted, and what filesystem type is it?

  7. #7
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,630
    Code:
    /dev/hda6        swap             swap        defaults         0   0
    /dev/hda14       /                reiserfs    defaults         1   1
    /dev/hda15       /home            reiserfs    defaults         1   2
    /dev/hda1        /media/xp        ntfs        ro               1   0
    /dev/sda5        /media/wd_fat_1  vfat        defaults         1   0
    /dev/sda6        /media/wd_fat_2  vfat        defaults         1   0
    /dev/cdrom       /mnt/cdrom       auto        noauto,owner,ro  0   0
    /dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
    devpts           /dev/pts         devpts      gid=5,mode=620   0   0
    proc             /proc            proc        defaults         0   0
    none             /sys             sysfs       defaults         0   0
    The external partition in question is /media/wd_fat_1. It seems to me that if root can move files in and out of this partition (as I've been doing), root should also be able to change permissions and owners of files. I can do neither.
    Linux Mint + IceWM Registered: #371367 New Members: click here

  8. #8
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692
    Not sure why you can not change ownership, and I don't have a vfat partition to test theories on. But what you can do is use the mount options to change ownership.

    Try changing
    Code:
    /dev/sda5        /media/wd_fat_1  vfat        defaults         1   0
    to
    Code:
    /dev/sda5        /media/wd_fat_1  vfat        uid=uid_here,gid=gid_here         1   0
    Specify the UID and GID according to which you want to have ownership. If you do not know the UID/GID, then a quick way to find this out is by using
    Code:
    id user_name_here

  9. #9
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,630
    Hi anomie,

    I changed /etc/fstab like you said and tried it again...

    Code:
    dapper@dan:~$ cd /media/wd_fat_1/
    dapper@dan:/media/wd_fat_1$ su
    Password:
    root@dan:/media/wd_fat_1# ls
    SteamInstall.exe 
    Eudora_6.2.exe
    Final Draft 7 
    ZETA_1.1_LiveCD  
    My Documents    
    broodwar  
    starcraft   
    tresdemo.exe
    finaldraft7.exe 
    trespass
    SB24_WEB64_LB_1_04_0055.exe 
    Screenplays       
    lowellgrippo
    root@dan:/media/wd_fat_1# chown dapper:users lowellgrippo/
    chown: changing ownership of `lowellgrippo/': Operation not permitted
    root@dan:/media/wd_fat_1#
    I also added "users" to the fstab like Ozar and borromini mentiond, still nothing!

    All I want to do is change the ownership of the file - lowellgrippo. I did it this way minus the -R option, otherwise it would show "operation not permitted" on everything inside the file too which is quite a lot. I appreciate you all trying to help.

    This is driving me nuts! :bang_head_against_wall:
    Linux Mint + IceWM Registered: #371367 New Members: click here

  10. #10
    Linux Guru bryansmith's Avatar
    Join Date
    Nov 2004
    Location
    /Ontario/Canada
    Posts
    2,619
    Try changing this:
    Code:
    /dev/sda5        /media/wd_fat_1  vfat        defaults         1   0
    to
    Code:
    /dev/sda5        /media/wd_fat_1  vfat        iocharset=utf8,umask=000         0   0
    It's from the Ubuntu Guide and has seemed to work well for me (this will allow all users though).

    Bryan
    Looking for a distro? Look here.
    "There can be no doubt that all our knowledge begins with experience." - Immanuel Kant (Critique of Pure Reason)
    Queen's University - Arts and Science 2008 (Sociology)
    Registered Linux User #386147.

Page 1 of 3 1 2 3 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
  •