LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   can't change permissions (https://www.linuxquestions.org/questions/linux-newbie-8/cant-change-permissions-930381/)

daisychick 02-20-2012 03:14 PM

can't change permissions
 
CentOS 5.5 no X.

I used dd to clone partitions to a USB drive. As it turns out, I now need to work with some of the files on said drive. I am unable to chmod/chown. The error I get is:
Code:

[root@compute-01 4]# chown root:root  temp.tar.gz
chown: changing ownership of `temp.tar.gz': Read-only file system
[root@compute-01 4]#

how can I change permissions/ownership on this drive?

uhelp 02-20-2012 03:19 PM

remount it writable

daisychick 02-20-2012 03:33 PM

is there some trick to it I don't know about? I used
Code:

mount /dev/sdc1 -w /mnt/1
and that didn't work.

uhelp 02-20-2012 03:39 PM

Code:

mount -t ntfs-3g /dev/sdc1 /mnt/do-not-use-ntfs
should do it....

If you want to mount it writable for only one specific user use something like this:
Code:

mount -t ntfs-3g  -o uid=UserName, gid=GroupName, umask=0022  /dev/sdc1  /path/to/mount/point

daisychick 02-20-2012 03:45 PM

I think we're on the wrong path here. I'm pretty sure this is a UUID issue. I used dd so it should be an exact copy with permissions and everything.
Code:

[root@compute-01 temp]# mount
/dev/sdc1 on /mnt/1 type ext3 (rw)
/dev/sdc2 on /mnt/2 type ext3 (rw)
/dev/sdc4 on /mnt/4 type ext3 (rw)


daisychick 02-20-2012 03:48 PM

ls -lah shows directories like this:
Code:

?---------  ? ?          ?            ?            ? mm9
?---------  ? ?          ?            ?            ? m-tmp
?---------  ? ?          ?            ?            ? mytmp
?---------  ? ?          ?            ?            ? numpy-1.6.1


uhelp 02-20-2012 03:56 PM

Sorry. My fault.

No clue how i came to the assumption it is a windows drive...

Please give the exact "dd" command you used.

If you think it is only a matter of UUID, then use /dev/disk/by-id/whateverThisDriveIs
instead of /dev/sdc1
"ls -l" shows it.

uhelp 02-20-2012 03:57 PM

Quote:

Originally Posted by daisychick (Post 4607671)
ls -lah shows directories like this:
Code:

?---------  ? ?          ?            ?            ? mm9
?---------  ? ?          ?            ?            ? m-tmp
?---------  ? ?          ?            ?            ? mytmp
?---------  ? ?          ?            ?            ? numpy-1.6.1


that is very bad.
Something went terrible wrong.

daisychick 02-20-2012 04:04 PM

heh, I broke out of it before it was finished because it was taking too long. 58 hours to copy 1.8TB to a usb drive. Took all weekend. I was thinking I would just use rsync to copy over what's missing. How do I show the uuid with ls?

dd command was
Code:

dd if=/dev/sda of=/dev/sdb conv=notrunc,noerror

uhelp 02-20-2012 04:08 PM

It is always a good idea to cut of the engines over the atlantic ocean when the flight takes to much time.
Brings one quite fast back to drowning.

Change into directory and give "ls -l" or use
ls -l /dev/disk/by-id


All times are GMT -5. The time now is 06:16 PM.