Jump to content

.htaccess Problem & File and Folder permission


Recommended Posts

Hello , 

 

I have problem with .htaccess , 

 

when friendly url is on it show 404 Not found page for products and category  , but home page is ok .

 

apache rewrite is enable from server . (i updated with 2.2.16)

 

i removed .htaccess and make new one empty .

when friendly URL is on it will not regenerate .htaccess , as soon as i turn off friendly URL .htaccess regenerate .

when friendly URL is off everything is work ok , product page , category , pics 

but when it is on nothing . only home page 

 

also debug is on , no error appear .

 

Friendly URL problem Solved 

 

Open file  /etc/apache2/site-availble/default

 

on note pad just change none to All

<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all

</Directory> 

then restart apache server 

--------------------------------------------

Problem Solved

 

adduser yourusername www-data

chown -R www-data:www-data /var/www

chmod -R g+rw /var/www

find /var/www -type f -exec chmod 664 {} \;

find /var/www -type d -exec chmod 775 {} \;
find
/var/www -type d -exec chmod g+s {} \;

service apache2 restart

 

Source : http://forums.phpfreaks.com/topic/186274-debian-varwww-file-permissions/

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

If you are using PS 1.5. please see the recommended permissions here if they are now changed: http://www.prestashop.com/forums/topic/60420-is-setting-chmod-to-777-dangerous/?do=findComment&comment=1526656

 

Ask you provider if you have permissions for to make changes on CHMOD, perhaps he changed some rights on the server when upgrading his software. Ask also if mod_rewrite module ist installed and activated, otherwise you will get in troubles.

 

Clear also the (smarty)cache files on  your back-office

Link to comment
Share on other sites

talk to your hosting provider and ask them if you domain runs as file 'owner'.  Your file permissions should be owned by your domain name.

 

im hosting by my own on my server , on that server ran my previous shop that wasn't prestashop , it was working great , 

i update everything for prestashop but i had these problem 

If you are using PS 1.5. please see the recommended permissions here if they are now changed: http://www.prestashop.com/forums/topic/60420-is-setting-chmod-to-777-dangerous/?do=findComment&comment=1526656

 

Ask you provider if you have permissions for to make changes on CHMOD, perhaps he changed some rights on the server when upgrading his software. Ask also if mod_rewrite module ist installed and activated, otherwise you will get in troubles.

 

Clear also the (smarty)cache files on  your back-office

i read that topic before , but not working for me , i activated the rewrite on server , im not getting error in prestashop about rewrite mod , smarty cash i clear as well 

Link to comment
Share on other sites

re you own server..then check that owner is your domain.  I've seen this problem 'before' espeically for the 'savvy' person with their own server...they create by hand the domain folder, which makes the owner the same as your server login, not the domain.

 

so please follow up as suggested, as for running 'another' domain...that is moot as it concerns this issue

  • Like 1
Link to comment
Share on other sites

Friendly URL problem Solved 

 

Open file  /etc/apache2/site-availble/default

 

on note pad just change none to All

<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all

</Directory> 

then restart apache server 

--------------------------------------------

Problem Solved

 

adduser yourusername www-data

chown -R www-data:www-data /var/www

chmod -R g+rw /var/www

find /var/www -type f -exec chmod 664 {} \;

find /var/www -type d -exec chmod 775 {} \;
find /var/www -type d -exec chmod g+{} \;

service apache2 restart

 

Source : http://forums.phpfre...le-permissions/

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

re you own server..then check that owner is your domain.  I've seen this problem 'before' espeically for the 'savvy' person with their own server...they create by hand the domain folder, which makes the owner the same as your server login, not the domain.

 

so please follow up as suggested, as for running 'another' domain...that is moot as it concerns this issue

i didnt get your point about domain owner , shall i check it on linux or where ? 

Link to comment
Share on other sites

re you own server..then check that owner is your domain.  I've seen this problem 'before' espeically for the 'savvy' person with their own server...they create by hand the domain folder, which makes the owner the same as your server login, not the domain.

 

so please follow up as suggested, as for running 'another' domain...that is moot as it concerns this issue

as i checked Group : root[0] and Owner : root[0]

i think problem becuz of this , 

can you tell me how can i fixed it ?

Link to comment
Share on other sites

see chown for your server environment.  You will need to set the chown -R 'owner':'group' doc_root

the owner and group is root , how can give permission to shop to can to create and edit files ?

 

i found this post 

http://forums.phpfreaks.com/topic/186274-debian-varwww-file-permissions/ 

but i think first i need what group and user i have to add that shop can edit files . 

 

and i dont understand how can i assign it to shop 

Link to comment
Share on other sites

Actually prestashop dosent  have permission to /var/www/ , only if all folder and files in /var/www set as 0777 prestashop can to edit and update files .

 

I do not recommend using 0777.  It's best to fix this properly, and it can be a pain but if you want to run your own server...then you sometimes have to learn to do it correctly.

 

If you use cpanel/plesk or other server admin control panel it creates the correct permissions for a domain.

Link to comment
Share on other sites

the owner and group is root , how can give permission to shop to can to create and edit files ?

 

i found this post 

http://forums.phpfreaks.com/topic/186274-debian-varwww-file-permissions/

but i think first i need what group and user i have to add that shop can edit files . 

 

and i dont understand how can i assign it to shop 

 

if you read a post that has 'experimenting' hit the back button to your search results and keep looking.

 

you might find this helpful

 

http://computernetworkingnotes.com/user-and-group-administrations/chown-chgrp.html

 

http://www.computerhope.com/unix/uchown.htm

  • Like 1
Link to comment
Share on other sites

if you read a post that has 'experimenting' hit the back button to your search results and keep looking.

 

you might find this helpful

 

http://computernetworkingnotes.com/user-and-group-administrations/chown-chgrp.html

 

http://www.computerhope.com/unix/uchown.htm

i know how to give permission to user and group and change folders and files owner .

prestashop made of many files and folders . and it make me confused to how i can to give permission to prestashop with out any user and group ? 

 

prestashop has any user for this purpose ? 

i confused that 

Link to comment
Share on other sites

×
×
  • Create New...