Problem CHMOD / FTP

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
Musicfacts
Posts: 2
Joined: Tue 27. Nov 2007, 02:37

Problem CHMOD / FTP

Post 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.
User avatar
pico
Posts: 2595
Joined: Wed 28. Jul 2004, 18:04
Location: Frankfurt/M Germany
Contact:

Post 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 ;)
Lieber Gott gib mir Geduld - ABER BEEIL DICH
Horst - find me at Musiker-Board
Musicfacts
Posts: 2
Joined: Tue 27. Nov 2007, 02:37

Anyone else?

Post 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
Peekay
Posts: 286
Joined: Sun 25. Jul 2004, 23:24
Location: UK

Post 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.
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Re: Anyone else?

Post 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)...
Last edited by Jensensen on Thu 29. Nov 2007, 19:31, edited 1 time in total.
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
User avatar
pico
Posts: 2595
Joined: Wed 28. Jul 2004, 18:04
Location: Frankfurt/M Germany
Contact:

Post 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
Lieber Gott gib mir Geduld - ABER BEEIL DICH
Horst - find me at Musiker-Board
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Post 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
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
Post Reply