I am using xampp and uploading images to my directory(lampp/htdocs) as well as in the database. images are showing in the folder but appears in the browser while fetching the image from database(server)? a lock showing in images.
1 Answer
The image permissions are not in order meaning you don't have permission to view them or you don't belong to the group that does. Do ls -l /path/to/image(s)
to see the ownership and permission. Then change either ownership and or permissions of the same or add yourself to that group to have the required permissions.
Do the following:
Add yourself to the
xamppusers
group:usermod -a -G xamppusers $USER
Set the correct permissions on the
/opt/lampp/htdocs
foldersudo chmod -R 775 /opt/lampp/htdocs
Restart you system and add imags again to see if it works.
ls -l /path/to/images
so we see who owns them, perhapsroot
?