My servers are currently running a fresh install of Ubuntu 16.04 server, no direct nor indirect system changes have been made.
A folder/file is completely accessible when created, but if I use chmod to make the slightest change, I completely lose access to that folder, and the only way to access it is through root.
sudo chmod -r -777 will make the folder completely useless, and there is no way for me to access it.
777though. Rather go for e.g.755or644(depending on whether it should be executable/is a directory or not) to restrict write permissions for other users except the owner. – Byte Commander Nov 26 '17 at 21:25