Posts: 903
plvera
Joined: 11 Oct 2008
#1
Hello:

I've noticed that files in my cdrom (data files; e.g. txt) have root:root as the Owner:Group and there is no write permission. This is a hassle since when I transfer the files to my home directory they retain the no write flag although the ownership changes. The folder I'm transferring the files to does have read/write permission. So, I have to manually change the permission in each file.

Is there a way to fix this? I'm not sure if it's due to the root owner status of the cd-rom, but shouldn't the user be the owner, especially if it's being used to copy files?

thanks.

Pedro
Posts: 1,139
masinick
Joined: 26 Apr 2008
#2
plvera wrote:Hello:

I've noticed that files in my cdrom (data files; e.g. txt) have root:root as the Owner:Group and there is no write permission. This is a hassle since when I transfer the files to my home directory they retain the no write flag although the ownership changes. The folder I'm transferring the files to does have read/write permission. So, I have to manually change the permission in each file.

Is there a way to fix this? I'm not sure if it's due to the root owner status of the cd-rom, but shouldn't the user be the owner, especially if it's being used to copy files?

thanks.

Pedro
I would say that you are better off changing file ownership and protection values of the files in your home directory rather than changing the protection of a device file. If you really want your ordinary user account to have ready access to everything, you can always add your user ID to as many groups as you want, though some might argue with that approach.

While you could change the protection on a device file, there could well be unintended consequences, and it would require maintenance any time you change the system, so I do not consider that to be a good idea. Therefore, the best thing to do is to manage file protections of files in your home directory.

Any other opinions on this?
Posts: 903
plvera
Joined: 11 Oct 2008
#3
Hi Brian:

Thanks for the response. The home directory permission are appropriate (write/read, etc). However, when I transfer the files from the cd they reflect the cd's read only status, not the directory's.

I understand your point though, and it might be a hassle one has to live with. I was trying to avoid having to change the permission in each file I transfer (and I transfer files quite a bit between my systems).

Pedro
Posts: 1,139
masinick
Joined: 26 Apr 2008
#4
plvera wrote:Hi Brian:

Thanks for the response. The home directory permission are appropriate (write/read, etc). However, when I transfer the files from the cd they reflect the cd's read only status, not the directory's.

I understand your point though, and it might be a hassle one has to live with. I was trying to avoid having to change the permission in each file I transfer (and I transfer files quite a bit between my systems).

Pedro
Personally, I think it is a minor inconvenience to change file protections than it is to alter the behavior of the system and face possible consequences. You could write a script to make it fast. Do you know how to write simple Bash scripts? If not, I can make a few suggestions.
Posts: 1,520
eriefisher
Joined: 07 Oct 2007
#5
I just inserted a cd into my drive(photos), then checked the permissions, root:root as you posted. I then copied one photo to my /home and check permissions, me:me. So the permissions have been changed on the file once place in /home.

I checked /etc/group and this is what I found for the cd drive:

cdrom:x:24:eriefisher

Hope it provides some enlightenment.
Posts: 1,139
masinick
Joined: 26 Apr 2008
#6
eriefisher wrote:I just inserted a cd into my drive(photos), then checked the permissions, root:root as you posted. I then copied one photo to my /home and check permissions, me:me. So the permissions have been changed on the file once place in /home.

I checked /etc/group and this is what I found for the cd drive:

cdrom:x:24:eriefisher

Hope it provides some enlightenment.
I usually add my user name to cdrom, root, and a few other groups if it isn't done automatically, but often it is. Have not needed to do so with antiX recently so I do not recall if it is automatic or not.
Posts: 903
plvera
Joined: 11 Oct 2008
#7
Brian and Erie:

Thanks for your responses. Erie, yes I get the same thing too with the permissions changed. However, the file permissions (rw) only show read when I copy them. Maybe it's due to the fact that I burned the files in windoze? At any rate, as Brian said it's only a minor inconvenience to change the individual files to read/write.

Brian, thanks for the offer to help with a script. I might take you on that if I continue to do many files and if I feel the challenge of a script is worth it.

In the meantime, let me see how the dist-upgrade goes.

Pedro