File Permissions: Who are the user, group, and others on my web server? What perms should i use for uploaded files, php files, etc.?
I am using cPanel with apache 2 and php 5.2. I have a file upload script, which currently puts the uploaded files in a directory with 0777 perms and the file itself also has 0777 perms. this is because with other perms, i would be thrown an “Invalid Access” error. so, what perms should i use so that the files are secure, but can still be accessed when a user wants to download them via [...]Continue Reading »
Suppose I have a server accessible via FTP and it hosts websites Suppose I want to edit the website locally so it wont affect the site live, and suppose I edit a whole bunch of files, and I don’t want to deal with the hassle of keeping track of which files I’ve edited all the time… Once I finished editing I want to upload it to the server via FTP….is there some FTP software that [...]Continue Reading »
When I upload a large (>245 Mb) file to my MediaWiki wiki (using Upload file, same as for images), I see: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. This is a .avi file. I have set this as a permissible file type in LocalSettings.php. How can I solve this? Is there a time out for uploading files (though this takes less than 10 seconds)? [...]Continue Reading »
I’ve uploaded some files into a directory i’ve created (using a php upload script). At first I didn’t set the right chmod for dir. and files (411 instead of 777). Now this folder and files are stuck on the server, can’t delete using FTP, cant delete using script: unlink/rmdir. I don’t have server acces. Is there any way to still do this using PHP scripting? If chmod (“/somedir/somefile”, 755); // php script code does not [...]Continue Reading »
Recently it has become an issue that a user on one of our systems needs the ability to have the apache user have read and write capability to their site so that the upload portion of their site works correctly. How would you minimize the risk of somebody malicious going in and submitting a file that ends up being able to delete files in the web directory or worse yet taking over the apache daemon? [...]Continue Reading »
I’m the lead developer in a team of 2. My partner has only just joined the project and despite using GIT for version control etc, we are still stuck in the dark ages when it comes to code deployment. Currently I make all site updates via FTP (this way I have control / responsibility over everything that goes live), using Filezilla. I’ve done this for years, but we now have some large PHP classes (300KB), [...]Continue Reading »
What is the correct way to allow users to upload images to a site? I’m using mod_php so everything is done by apache, not the domains user. Right now I just chmod 777 the images folder and hope for the best I’ve been looking at adding an .htaccess file to prevent PHP from running in that folder. “I’m using mod_php so everything is done by apache, not the domains user.” I’d suggest stopping that right [...]Continue Reading »
I recently moved my file upload service to a new host, a Windows server (was on CentOS before). I’m running IIS + PHP on it, and moved all the php.ini settings from the previous server to the new one. The problem is, however, that large uploads seem to be timing out. The JS uploader never gets a response from the PHP script, as I guess it times out. Here are the most common upload related [...]Continue Reading »
- Windows File Permissions and Attributes
- What is the easiest way to upgrade my existing Perl 5.14 to Perl 5.16 on FreeBSD 9 using the ports system?
- Know if mysql has done its job
- Redirect https .com to https .co.uk without a valid SSL cert on .com without DNS change
- Why is it a bad idea to use customer email as from address