Jump to content

[Solved] Write permission problem with Google Sitemap generation


Recommended Posts

How can give write permission to the root directory knowing how dangerous it is?

An error occured while trying to check your file permissions. Please adjust your permissions to allow PrestaShop to write a file in your root directory

I've tried creating sitemap.xml, index_sitemap.xml and 1_index_sitemap.xml and gave write permission to them but no luck.

 

I'm using Prestashop 1.5.5.0 and Google Sitemap module 2.3.2

Edited by Eric Nguyen (see edit history)
Link to comment
Share on other sites

you have had several permission issues posted...

 

the most likely cause is the generation of your hosting account, i.e. the owner is not your url...

 

thus every time you try to do something from your domain, you are changing permissions, to what we do not know...and most likely something like 777, which is dangerous

 

you should contact your hosting company and tell them you need your shop to run as owner,

 

that all folders should be 755

and all files 644

 

if they can not help you, I suggest moving hosting

Link to comment
Share on other sites

Thank you, El Patron but I'm afraid your answer is a bit off.

 

Moving hosting is real hassle especially for a non-technical person so I don't know if it's a good solution. Passing the ball of responsibility to the hosting service provider is easy enough but the time taken will be huge.

 

Anyway, I'm using Amazon EC2 as server, I'm an engineer and I have absolute control of the hosting environment.

 

This must be something really trivial but not documented and I'm hoping someone can point it out for me :)
 

you have had several permission issues posted...

 

the most likely cause is the generation of your hosting account, i.e. the owner is not your url...

 

thus every time you try to do something from your domain, you are changing permissions, to what we do not know...and most likely something like 777, which is dangerous

 

you should contact your hosting company and tell them you need your shop to run as owner,

 

that all folders should be 755

and all files 644

 

if they can not help you, I suggest moving hosting

Link to comment
Share on other sites

Thank you, El Patron but I'm afraid your answer is a bit off.

 

Moving hosting is real hassle especially for a non-technical person so I don't know if it's a good solution. Passing the ball of responsibility to the hosting service provider is easy enough but the time taken will be huge.

 

Anyway, I'm using Amazon EC2 as server, I'm an engineer and I have absolute control of the hosting environment.

 

This must be something really trivial but not documented and I'm hoping someone can point it out for me :)

 

 

I have seen customers with this issue and worked them to resolve it.

 

To resolve see doekia suggestion below.

 

or as suggested have your hosting company resolve it or move hosts

 

to stay 'or' not fix this properly is folly...

 

 

Your web server is running against which account?

if it is www-data then do a chown recursive on you install with this user. Just match whatever user you web instance uses

adjust then permission to 755 for folders and 644 for files

Link to comment
Share on other sites

Guys,

 

This is an edited Version : 2.2.7 of the Google sitemap and it worked perfect for me. I found this in the forum.

 

Once you installed the sitemap. Click generate and after that go to your hosting folder and search for "Sitemap.xml" and open it and see the file to verify that its the new one. (If the old one exist then delete it)

 

After that Open your Google Webmaster Tools Account and submit the sitemap on index.

gsitemap.zip

Edited by Shazmin (see edit history)
Link to comment
Share on other sites

Hi all, thanks to your suggestions, I have resolved my problem.

 

Steps to resolve it:

Step 1: find out which Linux user Apache is running as

[root@ip-172-31-6-34 html]# ps aux | egrep '(apache|httpd)'
apache    7937  0.0  5.9 512672 36052 ?        S    03:21   0:03 /usr/sbin/httpd
apache    7938  0.0  3.9 500516 24280 ?        S    03:21   0:01 /usr/sbin/httpd
apache    7939  0.0  5.3 508648 32324 ?        S    03:21   0:01 /usr/sbin/httpd
apache    8309  0.0  5.3 508576 32252 ?        S    07:36   0:02 /usr/sbin/httpd
apache    8310  0.0  3.8 500516 23364 ?        S    07:36   0:01 /usr/sbin/httpd
apache    8797  0.0  4.7 506008 28824 ?        S    13:43   0:01 /usr/sbin/httpd
apache    8798  0.0  5.3 509196 32820 ?        S    13:43   0:00 /usr/sbin/httpd
apache    8801  0.0  5.3 508840 32492 ?        S    13:43   0:01 /usr/sbin/httpd
apache    8802  0.0  5.3 509584 32672 ?        S    13:43   0:01 /usr/sbin/httpd
apache    8998  0.0  4.2 502320 25948 ?        S    16:08   0:00 /usr/sbin/httpd
apache    8999  0.0  4.4 503836 26936 ?        S    16:08   0:00 /usr/sbin/httpd
apache    9000  0.0  3.7 500780 22684 ?        S    16:08   0:00 /usr/sbin/httpd
apache    9001  0.0  4.5 504100 27632 ?        S    16:08   0:00 /usr/sbin/httpd
apache    9002  0.0  5.6 511596 34344 ?        S    16:08   0:00 /usr/sbin/httpd
apache    9003  0.0  5.1 508568 31356 ?        S    16:08   0:00 /usr/sbin/httpd
apache    9004  0.0  4.4 503324 26864 ?        S    16:08   0:01 /usr/sbin/httpd
apache    9005  0.0  3.9 500508 24032 ?        S    16:09   0:00 /usr/sbin/httpd
apache    9006  0.0  4.4 504092 27056 ?        S    16:09   0:00 /usr/sbin/httpd
apache    9007  0.0  5.9 512592 36012 ?        S    16:09   0:00 /usr/sbin/httpd
apache    9008  0.0  3.9 500764 24284 ?        S    16:09   0:00 /usr/sbin/httpd
root      9248  0.0  0.1 101024   820 pts/0    S+   18:27   0:00 egrep (apache|httpd)
root     17286  0.0  2.0 390528 12396 ?        Ss   Nov24   1:52 /usr/sbin/httpd

 

in my case, it's "apache"

Step 2: Change the ownership of your root directory to such user. You DON'T have to change the ownership recursively though. Just the root directory is sufficient.

 

Enjoy ;)

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...