Answer the question
In order to leave comments, you need to log in
How to change permissions for a folder (disk) in Linux?
There is a folder / media / cdrom0 how to change it to all rights?
wrote:
chmod a=rwx /media/cdrom0
chmod -r -rwx /media/cdrom0
sudo chown -R root:root /media/cdrom0
wrote errors:
chown: change owner of '/media/cdrom0/*': File system is only accessible to read
chmod: change permissions for '/media/cdrom0/': The file system is read-only.
*-all files of the folder
need to change the rights for the whole disk
how to do it?
I realized that I need to copy the files
Answer the question
In order to leave comments, you need to log in
obviously the sdrom is mounted.
First you need to remove the disk (unmount). and then change the rights to the /cdrom directory itself.
/media/cdrom0 is a CD drive, it is physically read-only, no matter how hard you push on the rights.
What did you want to do? If you burn a disc, then this is not done this way.
change permissions on files - set permissions on all directories - set permissions on all files in this folder and below - owner root group root on everything in this folder (dangerous command to enter only with the full path otherwise there is an option to demolish the rights of the entire system works very fast .
but this is the answer to your question, however it is not entirely clear what you want to do.
Describe the real task, it seems you are doing something wrong
find /tmp/you_papka -type d -exec chmod 755 {} ;\
find /tmp/you_papka -type f -exec chmod 644 {} ;\
chmod -R root:root /tmp/you_papka
If the system is not too old - you can try overlay. This is just for cases of "repairing" read-only file systems without copying the contents.
# cd /tmp && rm -rf lower upper tmp merged && mkdir lower upper tmp merged
# mount /dev/cdrom lower
# mount -t overlay overlay -o lowerdir=lower,upperdir=upper,workdir=tmp merged
# cd merged
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question