Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Permissions confusion


all2coolnick

Recommended Posts

New user I'm afraid. I have installed oscommerce to test under standard Mac OSX 10.4.7 Apache. This seemed unecessarily painful but I seem to be there. I am using Library:Webserver:Documents as the site root. The problem I have is that although I can add data to the catalog and can change settings under the configuration section in admin, I can't change any setting in any of the modules (Payment, shipping etc.). I also get the following error at the top of the screen when clicking on Catalog within admin even though the permissions for this folder are the same as the rest of the site (Owner=read/write, Group=read/write, Everyone=read) :

Error: Catalog images directory is not writeable: /Library/WebServer/Documents/catalog/images/

 

I assume all these problems are basic permissions issues but I have some basic holes in my knowlege which is making it hard to interpret the help and posts I have read.

I understand the concept of permissions; read/write, owner/group/everyone etc. but when someone says to set owner permissions to read/write for example, they do not say who the owner should be i.e. when I access the admin area from a web browser either on the host or on a remote Mac, what user does the host see that request coming from? By default it's set to the main user (there is only one user account created in OSX on this machine).

I have tried temporarily setting read write for everyone along the whole path to the paypal module which I am trying to configure (running on local test server so no security issues) but it still won't save changes. It gives no errors and appears to let me edit it i.e. change my email address etc. but when I update, the changes have not saved.

 

Why does oscommerce not install it's files with the correct permissions? It seems to make the apparently easy WEB instal program rather pointless.

 

If this is too long to answer directly, could anyone point me to some reference that will explain how to set the permissions and what permissions to set to get oscommerce working on OSX?

Thanks

Link to comment
Share on other sites

This is a quick walk through permissions and it covers your Mac OS.

http://en.wikipedia.org/wiki/File_system_permissions

 

Why does oscommerce not install its files with the correct permissions? Oscommerce comes in the right permissions for the initial install.

 

Oscommerce is all read and writeable. Once installed the only files you should have to change the permissions are the 2 configure.php files.

 

If more files need to be changed after that are either because of the way you ftped your files on your server or your server does not allow the permissions to be changed to permissions you want to set for a file.

 

You should be able to ftp to your server and right click on the file in question. Once you have right clicked on your file you will choose properties and that is where you will set permissions. You may have to make choices until you come up with the right combo until you those file are read and writeable.

 

Owner permissions are the root or the one logged onto the server.

 

 

 

New user I'm afraid. I have installed oscommerce to test under standard Mac OSX 10.4.7 Apache. This seemed unecessarily painful but I seem to be there. I am using Library:Webserver:Documents as the site root. The problem I have is that although I can add data to the catalog and can change settings under the configuration section in admin, I can't change any setting in any of the modules (Payment, shipping etc.). I also get the following error at the top of the screen when clicking on Catalog within admin even though the permissions for this folder are the same as the rest of the site (Owner=read/write, Group=read/write, Everyone=read) :

Error: Catalog images directory is not writeable: /Library/WebServer/Documents/catalog/images/

 

I assume all these problems are basic permissions issues but I have some basic holes in my knowlege which is making it hard to interpret the help and posts I have read.

I understand the concept of permissions; read/write, owner/group/everyone etc. but when someone says to set owner permissions to read/write for example, they do not say who the owner should be i.e. when I access the admin area from a web browser either on the host or on a remote Mac, what user does the host see that request coming from? By default it's set to the main user (there is only one user account created in OSX on this machine).

I have tried temporarily setting read write for everyone along the whole path to the paypal module which I am trying to configure (running on local test server so no security issues) but it still won't save changes. It gives no errors and appears to let me edit it i.e. change my email address etc. but when I update, the changes have not saved.

 

Why does oscommerce not install it's files with the correct permissions? It seems to make the apparently easy WEB instal program rather pointless.

 

If this is too long to answer directly, could anyone point me to some reference that will explain how to set the permissions and what permissions to set to get oscommerce working on OSX?

Thanks

Link to comment
Share on other sites

Thanks for this. The WIKI has helpful but I still have the problem.

The host Mac has one admin user defined and is logged in as this user. I have cleared the error on the image directory be setting the permissions to 777 from the command line. It was previously on 775 but this generated an error within admin.

I cannot, however, get any changes to save when configuring payment modules in admin (no error messages, changes just don't stick). I've tried changing the permissions on the paypal.php module file (the module I am trying to configure) but I assume this is not actually where the changes are saved. Can anyone tell me where these changes are saved and what permissions the relevant files should be set to?

Is there anything other than permissions that could be causing these changes not to save?

 

Thanks

Link to comment
Share on other sites

Thanks for this. The WIKI has helpful but I still have the problem.

The host Mac has one admin user defined and is logged in as this user.

 

Terminal’s command line makes it simple to set permissions for any of your OS X files. Permissions specify access control–who may read, write or execute your files. The chmod command takes two or more arguments, the first is a multi-digit number that specifies your control choices, the rest is a list of files affected by this change.

 

The multi-digit number is created by summing up the permissions you’d like to apply. Quoting from the OS X manual pages, these numbers are as follows:

 

4000: (the set-user-ID-on-execution bit) Executable files with this bit set will run with effective uid set to the uid of the file owner. Directories with the set-user-id bit set will force all files and sub-directories created in them to be owned by the directory owner and not by the uid of the creating process, if the underlying file system supports this feature: see chmod(2) and mount(8).

2000: (the set-group-ID-on-execution bit) Executable files with this bit set will run with effective gid set to the gid of the file owner.

1000: (the sticky bit) See chmod(2) and sticky(8).

0400: Allow read by owner.

0200: Allow write by owner.

0100: For files, allow execution by owner. For directories, allow the owner to search in the directory.

0040: Allow read by group members.

0020: Allow write by group members.

0010: For files, allow execution by group members. For directories, allow group members to search in the directory.

0004: Allow read by others.

0002: Allow write by others.

0001: For files, allow execution by others. For directories allow others to search in the directory.

 

 

So, to set a file’s permissions to universal read, universal write you must sum up the read attributes and the write attributes for owner, group members and others: 0400 + 0200 + 0040 + 0020 + 0004 + 0002, which equals 0666 or more simply 666:

~~~~~~~~~~~~~~~~~~~~~

% touch bar

% chmod 666 bar

% ls -l bar

-rw-rw-rw- 1 ericasad ericasad 0 Jun 6 08:03 bar

Link to comment
Share on other sites

Thanks once again for the info. I think I've got the permissions thing now but still have no joy with editing the payment modules through the Admin web front end.

I have done a complete fresh re-install of oscommerce (this time into the main OSX user's home WEB root folder) just to check if I had messed anything up but it's exactly the same. I can access admin and the catalog front end. i can enter products in the catalog. I can update the site preferences but I cannot update payment module settings.

It appears from the module php file that these settings stored in the MySQL database which makes it extra strange since I am having no problem entering or retrieving SQL data. I even ammended the paypal.php module file to set my desired settings as the default when installing that module and that worked! So the module is managing to write data but the edit routine is not working. Obviously I have indirectly achieved my imediate aim of changing my settings but this was an ugly way of doing it and I still want to get to the bottom of why the admin system is not working.

Any ideas?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...