I've created a directory as root, but when I try to change ownership if it, it won't change! I have no idea why. (I've snipped the results of ls -halg
for brevity, in case you're wondering why some files are missing...)
root@localhost:/opt/tomcat/conf# mkdir Catalina
root@localhost:/opt/tomcat/conf# ls -halg
total 244K
drwxr-x--- 3 tomcat 4.0K May 12 17:09 .
drwxr-xr-x 9 tomcat 4.0K May 10 02:34 ..
drwxr-xr-x 2 root 4.0K May 12 17:09 Catalina
-rw-r----- 1 tomcat 13K May 12 15:32 catalina.policy
-rw-r----- 1 tomcat 7.1K Mar 30 10:29 catalina.properties
root@localhost:/opt/tomcat/conf# chown tomcat Catalina
root@localhost:/opt/tomcat/conf# ls -halg
total 244K
drwxr-x--- 3 tomcat 4.0K May 12 17:09 .
drwxr-xr-x 9 tomcat 4.0K May 10 02:34 ..
drwxr-xr-x 2 root 4.0K May 12 17:09 Catalina
-rw-r----- 1 tomcat 13K May 12 15:32 catalina.policy
-rw-r----- 1 tomcat 7.1K Mar 30 10:29 catalina.properties
root@localhost:/opt/tomcat/conf#
When I made the tomcat directory yesterday, it was happy to chown -R /opt/tomcat
everything to the tomcat user like it should. I'm really at a loss at why such a simple command fails.