chmod

smarty template compile directory not writable

hello all, i'm using the latest version of smarty (3.0rc3). i made my templates_c directory writable in command line (chmod -R 777 templates_c) but smarty still outputs this when i call $smart->utility->testInstall(); Testing compile directory... FAILED: ./php/classes/smarty/templates_c/ is not writable. Warning: rename(/tmp/wrtub1GxS,...

PHP: confused about file permissions, cannot unlink setup file?

I created a setup.php to handle MySQL table generation, and as an obvious precaution I added a way to delete it after it was finished. As using unlink(__FILE__) is impossible to do, I added deletion code to main.php?action=deleteconfig to unlink the file. setup.php has permissions 777, but it gives me a permission denied error when I un...

Linux change group permission to match owner permissions

Suppose I have a directory on Linux with a bunch of files and subdirectories. This is that root directory: drwxr-xr-x 13 user1 group1 4096 May 7 15:58 apps Now, I only want to alter the group portion of those permissions. I want to alter it such that it matches exactly the owner portion. The result for that directory would be: d...

How to set chmod for a folder and all of its subfolders and files in Linux Ubuntu Terminal?

So I want a way to set chmod 755 to /opt/lampp/htdocs and all of its content including subfolders and files, and If I create a new folder or file the chmod of that should be also 755. chmod 75 /opt/lampp/htdocs works but only for this folder :| ...

How to set default CHMOD in LINUX terminal?

Previous Question just to understand what I'm doing: How to set chmod for a folder and all of its subfolders and files in Linux Ubuntu Terminal? So if I change the chmod to 755 for chmod 75 /opt/lampp/htdocs and I restart the system I want the files to be in chmod 755. ...

PHP upload permission problem

right guys ive ran into a problem with file permissions with the following upload form. a text file is passed to the upload/ dir by global users. mysite$ ls -l drwxrwxrwx 2 user user 4096 2010-09-24 13:07 upload but as I am not logged in as root, the new file uploaded to the domain saved itself in the upload/ dir with limiting permiss...

php creates folder with 341 permissions

Hey Folks, Didn't got any luck finding an answer on google , so this is my last try before trying other methods. I have a script like this: // get current year and month $cur_year = date('Y'); $cur_month = date('m'); $long_type = $this->getFile_longtype(); $folder = $_SERVER['DOCUMENT_ROOT']."/...

when we need chmod +x file.py

i wrote a py script to fetch page from web,it just read write permission enough,so my question is when we need execute permission? ...

Why does my server keep creating new files with 0640 permissions in my PHP fwrite?

I'm using a simple fopen("w") and fwrite setup to write a new file on my server. Recently, this has been arbitrarily assigning 0640 permissions to these files, which means I can't view them from a browser. But it's not happening every time. Can anybody tell me why? What I'm missing here? Here's my code: if ($file=fopen("$filesDir/$yr/$m...

problem creating directories with chmodDirectory

I have a script running on a staging site where it takes an uploaded image, creates a directory (if it exists) and uploads the image to said directory. I am trying to change the directory that gets created to the live site and having no luck. Pretty certain that it's this block of code that is still looking for the staging URL instead o...

777 permissions for public_html - Internal Server Error on some servers, but not others?

I have a few different servers, and on some servers, I can chmod the public_html folder to 777 permissions without problems - but on other servers, I get error messages. When trying to access the domain I get an Internal Server Error, and in my cpanel error_log on one server I get messages like the following: Fri Oct 08 09:55:39 2010] [...