Ok. It seems that whenever I create a symlink to a directory it works just fine. I can access into it with my web browser. But when I create a symlink to a file, monkey gives me 'Forbidden' status. I tested that with same directory: 1. I created a directory. 2. Made a symlink of a <file> there. Result == Forbidden 1. Ok I then made symlink of the directory that contained <file>. Result == Works fine. I could download that file.
Ok. Is there anything I should know about symlinks? I create symlinks always like this:
Code Sample
ln -s <file/directory to link> <link (path) name>
.It could be the permissions set on the linked file. If it's readable only by the file's owner and group you will get a 403. Monkey runs as user "nobody", so a file with no read permission for "other" will be denied. For example, a file chmoded 644 will be readable, but 640 or 600 will not.I've checked that. But no. Files are on FAT partition. ;)
Maybe I can find a solution by creating a user that has limeted access. Then try to access with that account to those files.
If that goes just fine (meaning it's problem with monkey) then I think installing Cherokee and forgot Monkey.I have no idea how linux handles file permissions on fat partitions. Maybe it has to do with the way the drive is mounted, but i couldn't say.
I don't have any other ideas right now.You can change the owner and group of the files on a vfat partition using the uid=dsl and gid=staff options, either from mount or by adding them into the /etc/fstab entry for the device.
mount /dev/hda1 /mnt/test -t vfat -o uid=dsl,gid=staff
I was able to get monkey to serve up a web page from a FAT drive by first mounting the drive as shown above (so that the files were all dsl/staff), creating a link in my home directory, and then copying that link into /opt/monkey/htdocs:
Code Sample
mount /dev/hda1 /mnt/test -t vfat -o uid=dsl,gid=staff cd /home/dsl ln -s /mnt/test/myfile.html newfile.html sudo cp newfile.html /opt/monkey/htdocs