Sharing a folder
Karl Auer
kauer at biplane.com.au
Mon Nov 27 04:25:40 UTC 2023
On Sun, 2023-11-26 at 22:42 -0500, Bill wrote:
> WS-=> Oops! I tried using the command sudo chmod -R 666 /home/common
> and the directory structure of /home/common has been messed up.
> The common directory and all the directories inside the /home/common
> directory are now listed as being files. Of course, the actual files
> inside the common directory are inaccessible.
chmod can't change a file into a directory or a directory into a file.
It can only change permissions.
You probably mean that the executable bit (x) has been unset on the
directories, meaning that nobody except root can see inside them. Jon
LaBadie warned you that would happen :-)
> Which command will change a file(directory) back to a regular
> directory?
Jon also gave you a command that would find directories and change
their modes. This is a variant that just sets the user and group
executable bits on /home/common and any directories under it:
sudo find /home/common -type d -exec chmod ug+x {} \;
Regards, K.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)
http://www.biplane.com.au/kauer
More information about the ubuntu-users
mailing list