You are here:  » File Permission Error


File Permission Error

Submitted by R_Hemingway on Tue, 2012-10-02 17:46 in

Hi all,

Brand new to price tapestry and I'm having a bit of a problem getting the script up and running that to the following error:

"A file permissions error has occurred. Please check the permissions on the script and the directory it is in and try again."

Public HTML is set to 755
Price Tapestry directory is set to 755
Setup.php is set to 644 (was set to 666 when uploading script to server)

All other files and folders have been left as they were when uploaded.

Any help would be most appreciated.

Thanks

Richard

Submitted by support on Tue, 2012-10-02 20:55

Hi Richard, and welcome to the forum!

777 shouldn't be necessary anywhere within Price Tapestry, and the permissions you have described are all correct (please note setup.php is all lower case but that shouldn't be anything to do with - using Setup.php would ordinarily just result in a 404 error of course).

First thing to try, can you browse to (assuming /pt/ as the Price Tapestry installation folder)

/pt/revision.txt

? That will indicate whether it is a web server / permissions issue; or something more PHP related. If that works fine, try /pt/setup.php again if possible whilst checking your web server's error log.

It that doesn't reveal anything; or you don't have access to the web server's error log the next thing I would investigate is whether a .htaccess running in your higher level directory is using a catch-all rule that is taking precedence over the /pt/ folder. You can spot these by looking for just . or (.) as the rule - they should always be preceeded by something like:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

...as is the case with the stock Wordpress .htaccess file.

If still unable to excute setup.php; the next thing I would then do is create a test folder and script as follows

test/test.php

containing just

<?php
  
print "Testing";
?>

...and if that works, and displays just "Testing" then copy test.php into /pt/ and try

pt/test.php

And if the error occus once more; then there must be some difference between /test/ and /pt/ - check in the remote window of your FTP program to see if anything stands out (permissions / ownerhsip being the obvious ones)

Hope this helps! I'm just thinking through the steps I would go through as errors like this are never down to a "oh that's because", and it's not anything i've encountered before on either standalone or plugin installations.

If you're still not sure I'd be more than happy to check it out on your server if you'd like to drop me an email with temporary access details - no problem at all....

Cheers,
David.
--
PriceTapestry.com

Submitted by R_Hemingway on Sat, 2012-10-06 16:51

Hi David,

Thanks for the above!

For your information .htaccess is as follows

# Switch rewrite engine off in case this was installed under HostPay.
RewriteEngine Off
SetEnv DEFAULT_PHP_VERSION 53
DirectoryIndex index.cgi index.php
# BEGIN WordPress
# END WordPress

Wordpress was installed via Heart Internet's cgi script.

Have tried the test.php file/folder and it works fine in both its own and the PT directory.

Strangely enough setup.php is also now working, although connection to my database failed but that must be the values I have provided to it so will check them again.

Submitted by R_Hemingway on Sat, 2012-10-06 17:06

Now managed to install the tables so thanks for your help on that one David.

Unfortunately I now get the same permissions error when navigating to domain/pt/admin/ as I did when navigating to setup.php earlier

Interestingly I get the same error just navigating to domain/pt/

Could it be the Wordpress .htaccess file from my prev post in my public html file?

Thanks again!

Richard

Submitted by support on Sat, 2012-10-06 17:14

Hello Richard,

It may be worth temporarily renaming the .htaccess in the top level folder just in case it is that - for example .htaccess_ briefly.

Since test.php and setup.php have now worked; but browsing to just /pt/ gives the error; firstly can you try pt/index.php directly?

Similarly, pt/admin/index.php may give you access to the admin home page; in which case it may be a default document issue. If that may be the case - try adding this line to the end of /pt/.htaccess

DirectoryIndex index.php

Hope this helps! If things are still not making sense I would be more than happy to check it out over FTP for you - drop me an email with the details if you'd like me to take a look..

Cheers,
David.
--
PriceTapestry.com

Submitted by R_Hemingway on Sun, 2012-10-07 15:39

Hi David,

Have solved the above.

The other .php and .txt files had also uploaded as 666 permissions so I had to go through the whole lot and change them to 644!

Thanks for all your help. Much appreciated.