Advertisements

Solaris – ls or df error: cannot canonicalize .: Permission denied

On systems that the umask is set to 027, the directory that is created to be used as a mount point appears to have the correct permissions but you can’t get the disk space utilization or list (ls -la) the permissions of the current directory (.) or the level above (..)

user@solaris:~ $ umask
027

user@solaris:~ $ df -k /backup_export
df: cannot canonicalize .: Permission denied

user@solaris:/ # ls -ld /backup_export
drwxr-xr-x 17 oracle oinstall 1024 Dec 12 15:33 /backup_export

You see that with the root user there is no problem to execute the same command you used as a regular user

root@solaris:~ # df -k /backup_export
Filesystem kbytes used avail capacity Mounted on
/dev/vx/dsk/dadosdg/vol_bkp
92409856 22803105 65256478 26% /backup_export

To solve this problem, umount the filesystem

root@solaris:/ # umount /backup_export

root@solaris:/ # ls -ld /backup_export
drwxr-x— 2 root root 512 Aug 13 2007 /backup_export

Now you apply the permission to make the directory browsable to regular users. I set the permissions to 777 and mounted the filesystem

root@solaris:/ # chmod 777 /backup_export

root@solaris:/ # mount /backup_export

root@solaris:/ # df -k /backup_export
Filesystem kbytes used avail capacity Mounted on
/dev/vx/dsk/dadosdg/vol_bkp
92409856 22803105 65256478 26% /backup_export

The permissions are back to what used to be and now the error message doesn’t appear anymore

user@solaris:~ $ df -k /backup_export
Filesystem kbytes used avail capacity Mounted on
/dev/vx/dsk/dadosdg/vol_bkp
92409856 22803105 65256478 26% /backup_export

user@solaris:/ # ls -ld /backup_export
drwxr-xr-x 17 oracle oinstall 1024 Dec 12 15:33 /backup_export

Advertisements
%d bloggers like this: