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.)
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.)
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.
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?
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.
Try setting the permission with the mkdir function
mkdir('/folder_path/foldername', 0755);
Still no luck :/.
/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
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.
Ok i'll try. by the way where can i see the configuration?
It's usually found in the /etc/apache or /etc/httpd directory depending on which linux distro you're using.
I don't know what i did but it's working now. Thank you sir Oxiegen and sir gabriel.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.