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.

man chown

Unless I totally missed something?

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.

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…

If it’s a partition, post your fstab:

cat /etc/fstab

we can have a look at your permissions

Hi, If you do not want to take care about security so much you can easily do:

chmod 777 /IntHD2

If you want to take care about security little bit, the do:

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:

/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, …)

[FONT=Verdana]
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
[/FONT]

@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.

change them all to this

vfat         rw,uid=0,gid=0,umask=000,utf8=true 0 0

reboot

report back

or possibly

vfat users,gid=users,umask=0002,utf8=true, 0 0

might work better in suse

The problem you cannot execute scrip from other location is, that execute riht for file does not deppend only on execute attibute of file but also on security settings of system. It is possible to avoid running scripts/binaries from other folders than specified (usualy allowed are /bin, /sbin, /usr/bin, ~/bin, … ). You probably have this security enabled. It is posible to enable/disable this from YaST. It is in security settings or system settings (I cannot remember this exactly because I am currently at work without SuSE).

caf,

This worked!! The other method did not. Actually I should have mounted the partitions from /home instead from root as told here “http://forums.opensuse.org/install-boot-login/414516-how-chnage-owner-rooot.html”.

Anyways thanks, it is now working and if in future I need to re-install I will take care of this thing

Great well done!:wink: