I just set up a LAMP development server and am still bothering some things. The server is installed on a computer and I use a Windows laptop to write my code and test the site through a web browser.
My file upload script JPEG image files are successfully uploaded to the server, but when I try to view the images in a web browser, the permission is denied.
I check the file permissions on the server and they are 600
I can fix this issue with chmod 777 theimage.jpg
But it does not look like a perfect solution.
What's the solution with Apache configuration? Or should I do something else
Thank you- Mike
Update
To clarify, I'm capable of / var / www / Test / images
to upload a JPEG file, but after uploading the web browser is unable to see the image works on my script production server (I'm using Dreamhost) to believe me Turns to the problem that is with the development server, which I have just setup, a lot of any reaction Grew is done, even though this is the only resource that I should read to understand server setup better.
You need to change the permissions of the folder that contains the file, not just the file itself Use the sudo chmod
and sudo chown
on the directory, in which you want to log in, make sure that ls -rl
The permission to use with the command Chmod should be r
and w
and the directory should read -rw-rr -
, when Ls -rl
of the command If the permissions have been changed correctly, besides, if you are still unclear about checking the work of chimod and lamp.
Edit:
Type it:
Sudo chmod-R 666 / var / www / test / Images
or this:
pseudo chmod a = rw / var / www / test / images
. .. For more explanation of what you want to do, see my latest comment entry below.
Comments
Post a Comment