Forums / General Questions / /pub permissions - should be set to 777 or 755 ?

/pub permissions - should be set to 777 or 755 ?

Locked

Views: 2,011

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
25 Aug 2008, 2:25 AM
#1
zcnb avatar

zcnb

Zen Follower

Join Date:
Jun 2008
Posts:
338
Plugin Contributions:
0

/pub permissions - should be set to 777 or 755 ?

ZenCart 1.3.8a's Configuration > Attribute Settings > Download by Redirect says (on the web page itself):

Note: Set /pub to 777 when redirect is true

OTOH, I read in a tutorial that it should be set to 755.

Which is correct?

And why?

Thanks!

25 Aug 2008, 3:34 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: /pub permissions - should be set to 777 or 755 ?

Depending on your host configuration - can be 755 or 777 -

Reason - permissions have to be set to allow access for downloading and on some 755 is sufficient and a bit more secure than 777

Usually, 755 for one that is running SUEXEC & PHPSUEXEC

Zen-Venom Get Bitten

25 Aug 2008, 3:41 AM
#3
zcnb avatar

zcnb

Zen Follower

Join Date:
Jun 2008
Posts:
338
Plugin Contributions:
0

Re: /pub permissions - should be set to 777 or 755 ?

kobra:

Usually, 755 for one that is running SUEXEC & PHPSUEXEC
Thank you very much, kobra. How do I know whether my particular host is running SUEXEC or PHPSUEXEC?

Thanks,
Daniel

25 Aug 2008, 4:05 AM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: /pub permissions - should be set to 777 or 755 ?

Easiest is to ask host or check their FAQ's

Zen-Venom Get Bitten

25 Aug 2008, 4:13 AM
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: /pub permissions - should be set to 777 or 755 ?

Actually, without SUEXEC, a server can be configured to run one version of php as a module (non-cgi) and another php version as cgi and not have SUEXEC/PHPSUEXEC installed - so this is not a definitive test.

Zen-Venom Get Bitten

12 Sep 2008, 5:00 PM
#7
zcnb avatar

zcnb

Zen Follower

Join Date:
Jun 2008
Posts:
338
Plugin Contributions:
0

Re: /pub permissions - should be set to 777 or 755 ?

Belated thanks. I checked with my web host and I was surprised that they are running neither SUEXEC nor PHPSUEXEC, but rather a third variant: suPHP.

Does this change your answer regarding the /pub permissions?

Thanks,
Daniel

13 Sep 2008, 4:06 AM
#8
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: /pub permissions - should be set to 777 or 755 ?

My answer is still to check with your host and use the lowest permissions that will function

Zen-Venom Get Bitten

18 Sep 2008, 4:46 PM
#9
zcnb avatar

zcnb

Zen Follower

Join Date:
Jun 2008
Posts:
338
Plugin Contributions:
0

Re: /pub permissions - should be set to 777 or 755 ?

I checked and suPHP works fine with 755. Thank you! :thumbsup:

18 Sep 2008, 5:36 PM
#10
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: /pub permissions - should be set to 777 or 755 ?

Permissions can be confusing as some scripts, such as Zen Cart, tell you permissions need to be 777 for certain things. Those settings are based on 'lowest common denominator' in order for certain functions/features of a script to work. All are superseded by settings on individual Servers which is why you need to contact your Hoster when in doubt.

Now that you know your Hosting account uses suPHP (meaning PHP is run as CGI) you should never use 777 permissions for any file or dir. -- it will not work and/or cause problems.

In your situation, all permissions should be:

  • 755 for dir.
  • 644 for files

Should also be smooth sailing for you now. :smile:

The learning is in the doing.

Potent Products