Page 1 of 1

Problem CHMOD / FTP

Posted: Tue 27. Nov 2007, 02:54
by Musicfacts
Hi there,

A newbie here, with an old problem: chmod and ftp take-over.

I recently moved my homepage to another server. It works almost fine, but there is a chmod problem while uploading files trough the ftp-takeover and regular files upload. The file is there, but it doesn't show up (no picture/thumbnail).

The new server has - for security reasons - a regular setting of 600 for files and 700 for directories. I already know how to 'chmod' it by hand (the pictures show up), but i would like to know if there is an easier solution. For example a script or a modification of one of the files.

I already modified files.private.upload.tmpl.php for uploading files in the FCK-editor. That works fine.

Looking forward to your answers and tricks :-)

Greetz,
Michael

Ps. still working with 1.2.6.

Posted: Tue 27. Nov 2007, 08:25
by pico
Hi

with 600 or 700 setting for the Permissions you never get it to work - this means that nobody can READ anything - so you need to set at least a 4 at the last Digit like 604 or 704 for Public-Read

http://www.robolink.co.uk/calculators10.htm

this is a very 'secure' Setting - next will be a turn Off of the Server ;)

Anyone else?

Posted: Tue 27. Nov 2007, 20:37
by Musicfacts
Not really the answer i was hoping for :-)

The file files.private.upload.tmpl.php can be modified to do a chmod on the picture during the uploadprocedure. Isn't it possible to modify the PHPWCMS-files for ftp-takeover and file-upload @ files?

Thanks in advance!
Michael

Posted: Wed 28. Nov 2007, 15:41
by Peekay
@pico
The host is probably running phpsuexec. File and folder permissions work differently. You can use a file permission of 600 for a file and it should still be viewed (parsed) in a browser. Maximum allowed permissions for folders is 755.

Re: Anyone else?

Posted: Wed 28. Nov 2007, 20:33
by Jensensen
Musicfacts wrote:...ftp-takeover...
means something different:

FTP-Takeover is the built-in method for uploading files (instead of http-upload) to the directory 'upload' using an ftp-client.
This allows the filing/sorting of your files to a virtual directory structure in the backend of phpWcms.

Thus it appears that DIRECTORIES are NOT CREATED by phpwcms (at any time) in your (FTP) root directory.
Musicfacts wrote:...modify the PHPWCMS-files [be]for[e] [..] file-upload...
As far as you mean uploading the whole distribution package using ftp to your server, it is usually [only/mostly] possible/necessary to --> CHMOD files --> afterwards!

Read the manual of your ftp-client...

greetz

PS: due to a lack of advanced installing/[auto-]upgrade routines --> still missing so far... :cry:

AGAIN: the phpwcms installer scripts NEITHTER CREATE a directory NOR do they CHMOD user rights!! The scripts just check the settings that YOU will have to set at first (before running the installer)...

Posted: Thu 29. Nov 2007, 08:24
by pico
@Peekay
OK didn't kow about that - thx,

but it seems that it is not working correct !? or why the Thumbs didn't show up. Also the Ownership must be set correct - have seen it sometimes, that the Folders and the Files has different Owners or in other Words Folders/Files created by FTP-Client gets another Owner as they there are 'generated' by the PHP-Script

Posted: Thu 29. Nov 2007, 20:09
by Jensensen
@Peekay

some mysteries about phpwcms installer:

With folder permissions 755 only for all the relevant folders I NEVER could complete the installer scripts, so far.
Error reported by installer: not writable...

Even 775 failed, so I needed to switch to 777.

But then on the other hand, certain folders/files (of the relevant ones) obviously WERE/ARE writable for phpwcms with CHMOD permission setting 755.

Even the installer script requests other values.

So, for me, some kind of fine tuning with permissions was working best during installation. Maybe depends on hoster/server.

Have no experience with phpsuexec, don't know.

Greetz