coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Upload => Topic started by: Cisi on April 06, 2005, 05:32:18 PM

Title: Check Edit permission function
Post by: Cisi on April 06, 2005, 05:32:18 PM
Because of problems with permission of edit folder and view that in some cases they rechange automaticaly , would be nice to add a function that check if they are 777 or 775 . If yes upload continue , if not they are changed automatically and then upload continue .
Is it possible .
Thanx a lot for your support .. anyway .
Regards.
Cisi
Title: Re: Check Edit permission function
Post by: Nibbler on April 06, 2005, 05:35:29 PM
Do you still have this problem with 1.4 ?
Title: Re: Check Edit permission function
Post by: Cisi on April 06, 2005, 06:08:27 PM
Quote from: Nibbler on April 06, 2005, 05:35:29 PM
Do you still have this problem with 1.4 ?

1.4 ?? in download section i see the latest version is 1.3.2 .. the one that i've  :o ???
I've also put on server picmgmt.inc.php v 1.9 , like suggested some post above ..
Please tell me if there is a new version avaible .
Thanx in advance .
Cisi
Title: Re: Check Edit permission function
Post by: Nibbler on April 06, 2005, 06:12:11 PM
Your profile information says Coppermine version: cpg1.4.x so I assumed that is what you are using.
Title: Re: Check Edit permission function
Post by: Cisi on April 06, 2005, 07:14:08 PM
Sorry , i was wrong . I have 1.3.2 ... dont know where to keep 1.4 .. can u help me ? thanx .
Title: Re: Check Edit permission function
Post by: Cisi on April 07, 2005, 04:31:46 PM
Ok , i've seen that 1.4.x version of coppermine is alpha release .
So .. anyone can tell me if there is a way to check folder permission and in case change it ?
Thanx again .
Title: Re: Check Edit permission function
Post by: OmegaGOD on April 08, 2005, 06:38:20 AM
You can check and change folder permissions with most FTP programs.
Title: Re: Check Edit permission function
Post by: Cisi on April 08, 2005, 11:25:50 AM
Quote from: OmegaGOD on April 08, 2005, 06:38:20 AM
You can check and change folder permissions with most FTP programs.

Yes , sure .. but i can't stay all time online for checking  ;D .
So , i solved (hope) .
I made a new php page "chmod.php" :

<?php
$foldercheck = dirname($_SERVER['SCRIPT_FILENAME'])."/albums/edit";
chmod("$foldercheck", 0755);  
?>


And in upload.php

After // Call basic functions, etc.
require('chmod.php');

I hope that this solution solve lots of request for automatic chmod check and change .
On my host , i've tested , it runs well .

Thanx anb bye .
Cisi
Title: Re: Check Edit permission function
Post by: OmegaGOD on April 09, 2005, 06:01:40 PM
Yes, that is definately a work around; however, your folders should not be changing permissions automatically. Either your FTP program is changing them without you specifiying it to do so (very bad) or your web-server is changing the permissions (also very bad). CPG does not change permissions of the 'album' or 'edit' directories at all. This is why upon installation you are required to change them. I run a secured web-server with approx 30 CPG. I have encountered this permission problem twice with my clients and both times there FTP software was responsible for it.

Hope this helps,

--OmegaGOD