[SOLVED] how do I change the ownership of a hard drive?

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] how do I change the ownership of a hard drive?

Postby arminius » Jul 17th, '12, 14:13

Ive formatted a hardrive, but I cant move any files into it, it just says "access denied cannot write to ..........."
the ownership of the drive is with root, how do I transfer it to my username?
I assume that will then allow me to transfer any file I please?
Last edited by arminius on Jul 18th, '12, 00:12, edited 1 time in total.
arminius
 
Posts: 82
Joined: Jul 2nd, '12, 07:16

Re: how do I change the ownership of a hard drive?

Postby tom_ » Jul 17th, '12, 15:22

to do that you should mount your disk in readwrite mode and with the option 'users'

digit
Code: Select all
man mount


to have more details about this command,
or post the output of the mount command
if you want more help
tom_
 
Posts: 423
Joined: Sep 3rd, '11, 12:26
Location: Porto Ercole, Italy

Re: how do I change the ownership of a hard drive?

Postby arminius » Jul 17th, '12, 15:55

wow, over a 1000 pages just to give myself permission to my own hard drive, if I must study this much then I will.
but was hoping someone could pass the command.
Last edited by arminius on Jul 18th, '12, 00:03, edited 1 time in total.
arminius
 
Posts: 82
Joined: Jul 2nd, '12, 07:16

Re: how do I change the ownership of a hard drive?

Postby Ken-Bergen » Jul 17th, '12, 16:29

Please post the contents of /etc/fstab
Ken
Ken-Bergen
 
Posts: 1019
Joined: Mar 30th, '11, 02:45
Location: Chilliwack, BC, Canada

Re: how do I change the ownership of a hard drive?

Postby madeye » Jul 17th, '12, 16:38

Assuming your drive is mounted on the following folder:
Code: Select all
/mnt/diskdrive

You can use the command
Code: Select all
chown -R username.groupname /mnt/diskdrive

You need to replace username and groupname with you own of course.
The -R switch tells chown to do the same to any sub-directories.
- Madeye

When I supply commands in an answer, please make sure you understand them before you run them! Use google or man to check!
User avatar
madeye
 
Posts: 110
Joined: Jul 23rd, '11, 12:36
Location: Aabenraa, Denmark

Re: how do I change the ownership of a hard drive?

Postby tom_ » Jul 17th, '12, 16:43

tom_ wrote:or post the output of the mount command
if you want more help


I really can't understand what is not clear in these two lines :(
tom_
 
Posts: 423
Joined: Sep 3rd, '11, 12:26
Location: Porto Ercole, Italy

Re: how do I change the ownership of a hard drive?

Postby doktor5000 » Jul 17th, '12, 21:06

arminius wrote:wow, over a 1000 pages just to give myself permission to my own hard drive

Well, how do you count, that man page has 2140 lines, in a standard terminal with 40 colums that makes up for 54 pages half full of text.
But nobody has said you have to read all of those, that was more a "for your information"-type notice.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18058
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: how do I change the ownership of a hard drive?

Postby arminius » Jul 18th, '12, 00:08

tom_ wrote:
tom_ wrote:or post the output of the mount command
if you want more help


I really can't understand what is not clear in these two lines :(


sorry, assumed I had missunderstood, cause this was alot of information it outputted.

Code: Select all
rootfs on / type rootfs (rw)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,relatime,size=2065064k,nr_inodes=193507,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
/dev/sda5 on / type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,relatime,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=23,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
securityfs on /sys/kernel/security type securityfs (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
systemd-1 on /proc/bus/usb type autofs (rw,relatime,fd=28,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sda1 on /media/windows type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)
usbfs on /proc/bus/usb type usbfs (rw,relatime,devgid=43,devmode=664)
/dev/sdb1 on /media/Internal Data type ext4 (rw,nosuid,nodev,relatime,user_xattr,acl,barrier=1,data=ordered)
/dev/sdd1 on /media/Ext Backup1 type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)
/dev/sde1 on /media/Ext VID1.5 type ext4 (rw,nosuid,nodev,relatime,user_xattr,acl,barrier=1,data=ordered)
/dev/sdc1 on /media/firewirevid type ext4 (rw,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered)


/media/firewirevid is the troublemaker.
arminius
 
Posts: 82
Joined: Jul 2nd, '12, 07:16

Re: how do I change the ownership of a hard drive?

Postby arminius » Jul 18th, '12, 00:11

madeye wrote:Assuming your drive is mounted on the following folder:
Code: Select all
/mnt/diskdrive

You can use the command
Code: Select all
chown -R username.groupname /mnt/diskdrive

You need to replace username and groupname with you own of course.
The -R switch tells chown to do the same to any sub-directories.


thanks, that worked perfectly.
arminius
 
Posts: 82
Joined: Jul 2nd, '12, 07:16


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest