Originally Posted by
pavelexpertov
Apologies if you think I haven't researched about this issue, but I believe it's to do with file/folder permissions, which I am not capable to do (yet).
Basically I have a LAMP set up (apache2 and php5) and I tried to change a documentroot folder to one in my home directory and when I try to access a site file, the apache complained I 'do not have permission' to access this site.
Can anyone help me with this permission issue?
Thanks
Let's assume for now that the problem is to do with permissions within the filesystem and not within apache configuration. In this case, paste the following into a script file e.g. ~/bin/pathperms.sh
Code:
#!/bin/bash
filename="$1"
if [ "$filename" = "" ] ; then
echo Usage: pathperms.sh filename
exit 1
fi
ls -ld "$filename"
dir=$( realpath "$filename")
dir=$( dirname "$dir")
while [ "$dir" != "/" ]
do
ls -ld "$dir"
dir=$( dirname "$dir")
done
exit 0
Then run e.g.
Code:
chmod +x ~/bin/pathperms.sh
~/bin/pathperms.sh /path/to/the/site/file
and post the output.
Bookmarks