Topic: how can I change permissions?

I'm looking at purchasing the sv manager, and have just run the test on my server.  Basic tests were fine, but the file tests return errors.  So i need to change the permissions, but have no idea how this is done.  Please help!

Re: how can I change permissions?

If you have a Unix server then you should be able to change permissions using ftp . The details of how to do it depend on which ftp program you are using – consult the help in your ftp program.

If you have a Windows server then ftp may not be able to change the permissions. Try it and see. In this case your server administrator will probably have provided a control panel that will allow you to change permissions. Have a look at your server documentation or ask the server helpdesk.

There is a section on permissions in the svManager user manual. You will also find a link to Wikipedia in the user manual where you can read-up on the background to permissions.

I suggest you practice on the test program and get that working before you dive into svManager itself.

jack

Jack Hardie
SimpleViewer Support Team.

Re: how can I change permissions?

I just purchased svManager but before purchasing I ran the test files. they all came back as success.

I am now using the svManager and every gallery I create I must change the permissions to 755 on the gallery. My goal is to have certain people be able to access the svManager but I don't want them to have access to FTP

Is their anyway I can solve the permission errors for new galleries?

Re: how can I change permissions?

Edit the file svmanager/includes/constants.php and locate the following line:

define('NEW_GALLERY_CHMOD', false);

Change this to:

define('NEW_GALLERY_CHMOD', true);

That tells svManager to attempt to change the permissions on new gallery folders – if your server will allow it. It will try to change the permissions to the value set in the next line of code:

define('NEW_GALLERY_DIR_MODE', 0755);

This is already set to 0755 so you should not need to change it.

This is also covered in the user manual under Changing the permission on new galleries.

jack

Jack Hardie
SimpleViewer Support Team.

Re: how can I change permissions?

Thanks for the reply, even though I missed it in the manual.  :oops:

Re: how can I change permissions?

Ok I grave that a try and it did not help.
I deleted the svManager from the website and re-uploaded a fresh copy.

When I create the first gallery it creates it the /g1 directory with permissions 777, subfolders with 755, all files except images with 666 files inside the /g1/images as 664. This gallery when viewed generates the 500 error.

I have also tried creating a second gallery and the /g2 directory does not show up in my ftp application but if I tell FileZilla to go to /www/svmanager/g2 it finds the directory. I then check the permissions on this folder and it shows up as xxx or unknown. This gallery also generates the 500 error.

If I then change the permissions on either gallery to 755 all the way through they both work and /g2 shows like the /g1 by browsing the /www/svmanager

Any help would be appreciated thanks.

Re: how can I change permissions?

What happened when you tried my previous suggestion about editing the constants file? Did svManager succeed in changing the permissions on the new gallery directory (g1 or whatever)? Did you get any error messages?

I'm finding it quite hard to understand what's happening on your server. I think I can work out what's happening when you create the first gallery. SvManager creates the svmanager/g1 directory and the permissions  are determined by a setting called umask on your server. Your hosting organisation may or may not allow you to change umask.

The files and directories inside the gallery directory are not created from scratch but copied from the master gallery directory. This is either svmanager/svmaster or svmanager/plugins/simpleviewer/svmaster, depending on the version of svManager you are running. Presumably the  0755/0666 permissions you are seeing inside g1 are copied from the master.

The 500 error probably occurs because your server doesn't like the 0777 setting on the g1 folder – even though the server (perversely) created that setting itself. I have seen one or two servers before that are set up in this rather odd way.

The inconsistent behaviour on creating the g2 gallery is a total mystery to me. SvManager creates g2 in exactly the same way as g1 so I can't see why it should be different.

So, you could take a look at the permissions on the master directory and see if tweaking them makes a difference. You could double-check that there are no mistakes in your edits to the constants.php file, such as a missing zero in front of the permissions or incorrect quote marks. You could ask your server admin/helpdesk if there is any way to control the permissions on new directories created by a php script. After that I'm running out of ideas.

jack

Jack Hardie
SimpleViewer Support Team.