July 10, 201114 yr I stupidly copied all of my files onto my unraid server from mapped drives while logged in as root on my windows 7 machine. Now my other windows PC's can not read the files. If I change the file ownership to 'everyone' and edit the permissions to 'modify' using the same windows 7 mapped drive, The files then appear readable on the other computers. My question is, how can I do this quickly and easily to all of the files? I am a total linux nube, and simple step by step instructions would be most appreciated.
July 10, 201114 yr Telnet onto unraid (or from console if you have keyboard/monitor setup) Change directory to the UserShare you want cd /mnt/user/usershare1 chmod -R 777 * (that will recursively change permissions to read/write/execute for everyone from that directory and below)
July 11, 201114 yr Thanks, I knew that there must be an easy way, I just couldn't find it. Just so you are clear, the above did not change the ownership of any of the files, it just gave all permissions to all users.
July 11, 201114 yr I use these two command: find /mnt/user/ -type f ! \( -user "nobody" -o -group "users" -o -perm "660" \) -exec chmod 660 '{}' \; -exec chown nobody:users '{}' \; find /mnt/user/ -type d ! \( -user "nobody" -o -group "users" -o -perm "770" \) -exec chmod 770 '{}' \; -exec chown nobody:users '{}' \; The first one is suited to files and the second to folders. Only the files and folders that have wrong permissions are fixed, saving some time.
Archived
This topic is now archived and is closed to further replies.