I am trying to install some package in my Joomla but got an error saying "error trying to delete inaccessible file". I checked with the package developer, they said I need to make sure all files and folders under my Joomla installation is accessible to the web server. I was reading some tutorial about find command and its -perm parameter, but the articles I read didn't mention how do I check permission against a particular user; Also they are all about checking files with permission but not without. So how do I find out which file/folder is causing the CMS to throw out this "inaccessible" error?


Access to directory is controlled by x - execute - bit in the permissions. The issue could be due to the user having no executable permissions as owner or a group to which user belongs has no executable permissions set on the directory.

In order to use find for that task, it's sufficient to specify -user as the owner of the directory and -not -executable flags.:

~$ find -type d -user $USER -not -executable
~$ ls -ld ./foo/bar ./test_access
drw-r-xr-- 2 admin admin 4096 Jan 15 03:36 ./foo/bar
drw-r--r-- 2 admin admin 4096 Jan  4 15:38 ./test_access

For cases where group part off the permissions is of interest, you could find groups the user belongs to and iterate over them:

for i in $(groups $USER | cut -d':' -f2) ; do find -type d -group "$i" -not -executable ; done

If neither case turns any potential results, the issue could be due to user not belonging to a group which has access to the directory that gives the issue.

Note also that web servers typically use www-data user/group. You probably want to be checking permissions using that username or group name.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.