Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Changing Owner Of A Drive, Change owner from root to user

  1. #1
    Join Date
    Jun 2008
    Location
    Formerly DE, now Antigua, W.I.
    Posts
    191

    Default Changing Owner Of A Drive, Change owner from root to user

    I have three HDD's in my system. the first drive is partitioned into the / and /home. The other two are on their own, kinda for my own use, films, music, work, backups of work from /home and email backups.

    I must have done something something wrong during the installation because I can't access my second drive at all. When I checked, using Konq, I saw that the the owner of the first drive (the partitioned one) and the third drive (my multimedia one) was silkmaze, that's me. However the owner of the second drive, the one I want to use for other stuff, is root.

    The drive in question is has ext3 FS.

    My fstab looks like this at the moment:
    /dev/disk/by-id/scsi-SATA_SAMSUNG_HD400LDS0AXJ1FP514051-part1 / ext3 acl,user_xattr 1 1
    /dev/disk/by-id/scsi-SATA_WDC_WD1600BB-00WD-WCALL1231345-part5 /IntHD3 ext3 defaults 1 2
    /dev/disk/by-id/scsi-SATA_SAMSUNG_HD400LDS0AXJ1FP514051-part5 /home ext3 acl,user_xattr 1 2
    /dev/disk/by-id/scsi-SATA_WDC_WD1600BB-00WD-WCALL1231345-part1 swap swap defaults 0 0
    proc /proc proc defaults 0 0
    sysfs /sys sysfs noauto 0 0
    debugfs /sys/kernel/debug debugfs noauto 0 0
    usbfs /proc/bus/usb usbfs noauto 0 0
    devpts /dev/pts devpts mode=0620,gid=5 0 0
    /dev/sdb5 /IntHD2 ext3 defaults 1 2
    The last entry - /IntHD2 - is the partition I want to access.

    I did change the entry from what it was originally -
    /dev/sdb5 /IntHD2 ext3 user,acl,user_xattr 1 2
    to what you see now.

    I did, before I did all that, go to yast, to Partioner, delete the partition, and then recreated it, so that if you were to have a look at the entry in the Partioner you would see the following:


    Device Size Type Mount Mount By Start End
    /dev/sdb1 465.7GB Extended
    /dev/sdb5 465.7GB Linux Native /IntHD2 K 0 60800
    I have labeled the drive IntDrv2.

    I initially deleted deleted the linux native partition then re-created it. Should I have deleted the drive completely then re-installed/initiallised it?.

    I am at a loss here. Someone please help.

    Thanks.

  2. #2
    Join Date
    Jun 2008
    Location
    Albuquerque, NM, USA
    Posts
    87

    Default Re: Changing Owner Of A Drive, Change owner from root to use

    man chown

    Unless I totally missed something?
    It's really that much fun!
    Geeko Samurai (cc)
    My Recent Tracks

  3. #3
    Join Date
    Jun 2008
    Location
    Formerly DE, now Antigua, W.I.
    Posts
    191

    Default Re: Changing Owner Of A Drive, Change owner from root to use

    How would that look. I have tried, as su the following

    chmod silkmaze:users /IntHD2

    but that didn't work.

    chown only applies to files not to partitions?

    Never mind just tried it out and it works.

    chown silmaze:users /IntHD2

    and bingo.

    Thanks benstein.

  4. #4
    weedfreak NNTP User

    Default Re: Changing Owner Of A Drive, Change owner from root to use

    I have a partition I created for sharing files across a mixed OS network, so for ease of use it is fat32. When creted via partitioner it was listed as belonging to root of group users ?? As root I can set the owner and group permissions to rw but others are only read and will not change to rw. Ideally for ease of use I would like to become the owner of the folder.

    Using properties / permissions in konq as root I get the message that I do not have enough permission to change the owner. Chown does nothing and no error messages. I have used partitioner to delete the partition (after umount) and recreate /reformat it but it is still user:root and group:users.

    I am at a loss as how to change ownership.

  5. #5

    Default Re: Changing Owner Of A Drive, Change owner from root to use

    Quote Originally Posted by weedfreak View Post
    I have a partition I created for sharing files across a mixed OS network, so for ease of use it is fat32. When creted via partitioner it was listed as belonging to root of group users ?? As root I can set the owner and group permissions to rw but others are only read and will not change to rw. Ideally for ease of use I would like to become the owner of the folder.

    Using properties / permissions in konq as root I get the message that I do not have enough permission to change the owner. Chown does nothing and no error messages. I have used partitioner to delete the partition (after umount) and recreate /reformat it but it is still user:root and group:users.

    I am at a loss as how to change ownership.
    I have the same problem. Can any one help out please....

  6. #6
    Join Date
    Jun 2008
    Location
    The English Lake District. UK - GMT/BST
    Posts
    36,719
    Blog Entries
    20

    Default Re: Changing Owner Of A Drive, Change owner from root to use

    If it's a partition, post your fstab:
    Code:
    cat /etc/fstab
    we can have a look at your permissions
    Leap 15_KDE
    My Articles Was I any help? If yes: Click the star below

  7. #7
    Join Date
    Apr 2009
    Location
    Ostrava, Czech Republic
    Posts
    25

    Default Re: Changing Owner Of A Drive, Change owner from root to use

    Hi, If you do not want to take care about security so much you can easily do:
    Code:
    chmod 777 /IntHD2
    If you want to take care about security little bit, the do:
    Code:
    chown :your-group /IntHD2
    chmod 770 /IntHD2
    and then move your user in to your-group.
    I tested it on my machine and it works. For sure there is fstab record of disk partition I tested it on:
    Code:
    /dev/sda3  /mnt/linux2  ext3  acl,user_xattr  1  2
    Basically attributes I have set should not affect my test, but you can try to set acl,user_xattr instead of yours default. The acl attribute means extended user rights (you can manage access to users and groups you want instead of standard R-W-X for user, group, others) and user_xattr allows to store additional attributes to files (like mime-type, check sums, selinux security info, ...)
    Laptop: openSuSE 11.0 on Asus F5V; Intel T2250 1730MHz; 2GB; 160GB; ATI Radeon X2300
    Desktop: openSuSE 11.1 on AMD Duron 1600MHz; 1GB; 160GB; nVidia FX5500
    Multimedia PC: openSuSE 11.1 on Intel Atom 330; 2GB; 840GB; Intel Acc 950; Leadtek DTV 2000H

  8. #8

    Default Re: Changing Owner Of A Drive, Change owner from root to use

    Quote Originally Posted by caf4926 View Post
    If it's a partition, post your fstab:
    Code:
    cat /etc/fstab
    we can have a look at your permissions

    Here it is....

    cat /etc/fstab
    /dev/disk/by-id/ata-FUJITSU_MHV2120BH_PL_NW9XT7238YBD-part6 / ext3 acl,user_xattr 1 1
    /dev/disk/by-id/ata-FUJITSU_MHV2120BH_PL_NW9XT7238YBD-part7 swap swap defaults 0 0
    /dev/disk/by-id/ata-FUJITSU_MHV2120BH_PL_NW9XT7238YBD-part5 /Documents vfat users,gid=users,umask=0000
    /dev/disk/by-id/ata-FUJITSU_MHV2120BH_PL_NW9XT7238YBD-part8 /MIsc vfat users,gid=users,umask=0000
    /dev/disk/by-id/ata-FUJITSU_MHV2120BH_PL_NW9XT7238YBD-part10 /Projects vfat users,gid=users,umask=0000
    /dev/disk/by-id/ata-FUJITSU_MHV2120BH_PL_NW9XT7238YBD-part2 /Studio vfat users,gid=users,umask=0000
    /dev/disk/by-id/ata-FUJITSU_MHV2120BH_PL_NW9XT7238YBD-part9 /home ext3 defaults 1 2
    /dev/disk/by-id/ata-FUJITSU_MHV2120BH_PL_NW9XT7238YBD-part1 /windows/C ntfs-3g users,gid=users,fmask=133,
    proc /proc proc defaults 0 0
    sysfs /sys sysfs noauto 0 0
    debugfs /sys/kernel/debug debugfs noauto 0 0
    usbfs /proc/bus/usb usbfs noauto 0 0
    devpts /dev/pts devpts mode=0620,gid=5 0 0

  9. #9
    Join Date
    Jun 2008
    Location
    The English Lake District. UK - GMT/BST
    Posts
    36,719
    Blog Entries
    20

    Default Re: Changing Owner Of A Drive, Change owner from root to use

    @silkmaze
    That entry for your partition should be fine. But in a terminal as su do:
    chown silkmaze /IntHD2
    (That assumes 'silkmaze' as user name)

    @vendetta18
    Which partition/s are we addressing?
    Leap 15_KDE
    My Articles Was I any help? If yes: Click the star below

  10. #10

    Default Re: Changing Owner Of A Drive, Change owner from root to use

    Quote Originally Posted by caf4926 View Post
    @silkmaze
    That entry for your partition should be fine. But in a terminal as su do:
    chown silkmaze /IntHD2
    (That assumes 'silkmaze' as user name)

    @vendetta18
    Which partition/s are we addressing?
    /MIsc, /Projects, /Studio, /Documents. Sorry missed in earlier post. my /home/user_name is owned by "user_name" and all other partition by "root". I am able to execute scripts from my $HOME but not from any other partition. Even though I did "sudo chmod 777 script_name", still it gives "permission denied". I checked the permissions and they were Read, write, execute for everyone.

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