Take the 2-minute tour ×

My question is why can't I set permissions on a file in /root?

I'm stumped. This bash script run from cron as a non-root user

# mail_df.sh Charles M. Norton 01/07/2013
# Emails df to some folks.

df | mail -s "Disk Usage For Public.somewhere.za.us" \

just started throwing out this error df: /root/.gvfs: Permission denied`, after an upgrade to our Centos 6 list server.

OK, so I'm going to fix this by having this run as root out of cron, but for some reason I cannot set the permissions on .gvfs as root.

I tried this as a workaround. I cannot figure out why chmod 755 .gvfs does not work, when command is issued by root.

[root@public ~]# ls -lda .gvfs
dr-x------. 2 root root 0 Feb 23 10:53 .gvfs

[root@public ~]#

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Any user that tries to modify the permissions of the files and directories inside /root needs execution permissions for /root itself. Since the same happened to .gvfs, I suspect that the permissions of /root got somehow altered as well.

Try executing this as root:

chmod 700 /root
chmod 755 /root/.gvfs
share|improve this answer
Thanks. I missed the obvious. –  octopusgrabbus Feb 26 '13 at 19:35

Your Answer


