Default permissions for /opt directory?
Solution 1:
My permissions for /opt are drwxr-xr-x
(with ownership root:root
). That's the default.
You can set this ownership and permissions (regardless of how it's set currently) with:
sudo chown root:root /opt
sudo chmod 0755 /opt
If you changed the permissions of files and folders inside /opt
as well, then a good solution might be more complicated. (You can add the output of ls -lR /opt
to your question, to show this.)