problems with msg folder and mod 777 setting

Is message board greying out your hair (at least what's left of it)? Let us help you here
Locked
puniksem
Posts: 47
Joined: Thu Nov 01, 2007 12:25 pm

problems with msg folder and mod 777 setting

Post by puniksem »

I've searched for an answer here but found nothing, so I ask you...

My service providers recently stopped file permissions being set to 777.
However one can set 777 to the msg folder.

The problem I have is that all *.html's saved by the script are set to 600 making it impossible for users to view posted messages.

Can you offer me a code snippet that I could add to mboard.php so it would mod the html files to 644? Then everything would work.

Thanks in advance
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Files shouldn't be on 777 anyway (unless it's for example a Perl script, but those usually need 755).

You can try adding

Code: Select all

chmod($newfile, 0644);
just below

Code: Select all

unset($footer);
and see if that helps.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
puniksem
Posts: 47
Joined: Thu Nov 01, 2007 12:25 pm

re: fix suggestion

Post by puniksem »

:D Thank you Klemen very much, that worked a treat, now my worries are over.

:D You're the best and your scripts are second to none. :D
One day you will be rewarded for your generosity and hard work.
Locked