0

Greetings pros :D.

I am having problem with creating a directory on my linux server. When i download a file it display that error.

(I migrated my php project from windows to linux using WinSCP.)

Edited by Jake.20

3
Contributors
10
Replies
36
Views
2 Years
Discussion Span
Last Post by Jake.20
Featured Replies
  • Here's the deal. Practically everything under and including www should be owned by the webserver. Check the config to see what user the server runs as, and change files and directories using the chown command. Otherwise the webserver and scripts cannot perform any file or directory action. You can later … Read More

0

The directory in which the php script resides in must be owned by the webserver.
Also, check to see if the correct permissions are set. Scripts run by mod_php should require 0644 at the least.

0

All folders has an octal of 0755 and all files with .php have an octal of 0644. How can i check if the php scripts are owned by the webservr?

Edited by Jake.20

0

Well. List the files and folders with the -al argument, the name of the owner should be there.
Normally the name of the webserver should be apache (if you run apache).
If the files are not owned by the webserver, simply change that with the chown command.

0

/var/www/vicidial/recording/class$ ls -la
total 24
drwxr-xr-x 2 root root 4096 Nov 20 2013 .
drwxr-xr-x 9 root root 4096 Nov 20 2013 ..
-rw-r--r-- 1 root root 3431 Oct 15 2010 connection.php
-rw-r--r-- 1 root root 4606 Oct 16 14:27 recording.php
-rw-r--r-- 1 root root 1062 Oct 22 2010 user.php

i got this when i use ls -la

1

Here's the deal.
Practically everything under and including www should be owned by the webserver.
Check the config to see what user the server runs as, and change files and directories using the chown command.
Otherwise the webserver and scripts cannot perform any file or directory action.

You can later on lock it up some using a .htaccess file.

0

Ok i'll try. by the way where can i see the configuration?

Edited by Jake.20

0

It's usually found in the /etc/apache or /etc/httpd directory depending on which linux distro you're using.

0

I don't know what i did but it's working now. Thank you sir Oxiegen and sir gabriel.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.