How to insert a reference to a blog in my entry?
[SMARTY] permissions hell
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Зарегистрируйся!

QAIX > PHP web-programming > [SMARTY] permissions hell 30 May 2002 21:37:22

  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:

[SMARTY] permissions hell

Eric Mueller 30 May 2002 21:37:22
 Hi guys-- I am having a Unix permissions problem with Smarty... the
pages are generating ok, but they're interspersed with this error:

"Warning: chmod failed: Operation not permitted in
/home/www_server/ge­arcrew.com/www/Smart­y.class.php on line 1379"

That piece of code is:

if ( strtoupper(substr(P­HP_OS, 0, 3)) == 'WIN' || (flock($fd,
LOCK_EX)) ) {
fwrite( $fd, $contents );
fclose($fd);
chmod($filename, 0644); // <- line 1379
}

What's up? Like I said-- the pages are generating just fine-- but the
chmod error message is mixing into the output so it looks bad.

On this box I believe apache runs as root (--how can I tell for sure?).
My templates_c directory looks like this:

drwx------ 42 nobody nobody 4096 May 28 19:48
templates_c


THANK YOU--

best,
Eric Mueller



--
Smarty General Mailing List (http://smarty.php.­net/)
To unsubscribe, visit: http://www.php.net/­unsub.php


Add comment
Zzd 29 May 2002 21:05:22 permanent link ]
 The template directory should probably be owned by the same user that is
running the apache httpd deamon. To figure this out, try the following:

ps -ef | grep httpd
This should produce a result like the following

ps -ef | grep httpd
apache 7566 7558 0 12:26 ? 00:00:04 httpd -DHAVE_PHP4 -DHAVE_SSL -DH
apache 7567 7558 0 12:26 ? 00:00:02 httpd -DHAVE_PHP4 -DHAVE_SSL -DH
apache 7568 7558 0 12:26 ? 00:00:03 httpd -DHAVE_PHP4 -DHAVE_SSL -DH
apache 7569 7558 0 12:26 ? 00:00:03 httpd -DHAVE_PHP4 -DHAVE_SSL -DH
apache 7571 7558 0 12:26 ? 00:00:02 httpd -DHAVE_PHP4 -DHAVE_SSL -DH
apache 7572 7558 0 12:26 ? 00:00:04 httpd -DHAVE_PHP4 -DHAVE_SSL -DH
apache 7573 7558 0 12:26 ? 00:00:05 httpd -DHAVE_PHP4 -DHAVE_SSL -DH

Clearly, my web server is being run by the user apache (your server may be
run by user nobody). Change the owner of all files in the templates_c
directory as follows:

chown -R apache:apache templates_c

Assuming that it is a permissions issue, this should resolve it for you.




On Wednesday 29 May 2002 01:28 pm, Eric Mueller wrote:> Hi guys-- I am having a Unix permissions problem with Smarty... the> pages are generating ok, but they're interspersed with this error:>
"Warning: chmod failed: Operation not permitted in> /home/www_server/ge­arcrew.com/www/Smart­y.class.php on line 1379">
That piece of code is:>
if ( strtoupper(substr(P­HP_OS, 0, 3)) == 'WIN' || (flock($fd,> LOCK_EX)) ) {> fwrite( $fd, $contents );> fclose($fd);> chmod($filename, 0644); // <- line 1379> }>
What's up? Like I said-- the pages are generating just fine-- but the> chmod error message is mixing into the output so it looks bad.>
On this box I believe apache runs as root (--how can I tell for sure?).> My templates_c directory looks like this:>
drwx------ 42 nobody nobody 4096 May 28 19:48> templates_c>
THANK YOU-->
best,> Eric Mueller

--
Smarty General Mailing List (http://smarty.php.­net/)
To unsubscribe, visit: http://www.php.net/­unsub.php


Add comment
Jason Sweat 29 May 2002 21:29:19 permanent link ]
 Assuming you have the ownership/permissio­ns set right
according to the Smarty install docs, this may be a
resurfacing of the PHP 4.2.0 and greater directory
creation problems. It seems to work fine under Linux,
but is broken under Mac OS X and HP-UX, possibly
others.

You might try a different version of PHP if you
continue to experience problems.

Jason

___________________­____________________­___________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup­.yahoo.com

--
Smarty General Mailing List (http://smarty.php.­net/)
To unsubscribe, visit: http://www.php.net/­unsub.php


Add comment
Eric Mueller 30 May 2002 21:37:22 permanent link ]
 Thanks for the responses-- just what I needed. I went through the steps
Zzd outlined below (--yeah, my Apache runs as 'nobody') and it fixed the
problem. Voila! Thanks.

best
Eric

http://ericmueller.­org
http://themepark.co­m


-----Original Message-----
From: zzd [mailto:craigduncan@nc.rr.com]
Sent: Wednesday, May 29, 2002 11:05 AM
To: Eric Mueller; smarty-general@list­s.php.net
Subject: Re: [SMARTY] permissions hell

The template directory should probably be owned by the same user that is

running the apache httpd deamon. To figure this out, try the following:

ps -ef | grep httpd
This should produce a result like the following

ps -ef | grep httpd
apache 7566 7558 0 12:26 ? 00:00:04 httpd -DHAVE_PHP4
-DHAVE_SSL -DH
apache 7567 7558 0 12:26 ? 00:00:02 httpd -DHAVE_PHP4
-DHAVE_SSL -DH
apache 7568 7558 0 12:26 ? 00:00:03 httpd -DHAVE_PHP4
-DHAVE_SSL -DH
apache 7569 7558 0 12:26 ? 00:00:03 httpd -DHAVE_PHP4
-DHAVE_SSL -DH
apache 7571 7558 0 12:26 ? 00:00:02 httpd -DHAVE_PHP4
-DHAVE_SSL -DH
apache 7572 7558 0 12:26 ? 00:00:04 httpd -DHAVE_PHP4
-DHAVE_SSL -DH
apache 7573 7558 0 12:26 ? 00:00:05 httpd -DHAVE_PHP4
-DHAVE_SSL -DH

Clearly, my web server is being run by the user apache (your server may
be
run by user nobody). Change the owner of all files in the templates_c
directory as follows:

chown -R apache:apache templates_c

Assuming that it is a permissions issue, this should resolve it for you.


On Wednesday 29 May 2002 01:28 pm, Eric Mueller wrote:
Hi guys-- I am having a Unix permissions problem with Smarty... the > pages are generating ok, but they're interspersed with this error:>
"Warning: chmod failed: Operation not permitted in > /home/www_server/ge­arcrew.com/www/Smart­y.class.php on line 1379">
That piece of code is:>
if ( strtoupper(substr(P­HP_OS, 0, 3)) == 'WIN' || (flock($fd,> LOCK_EX)) ) {> fwrite( $fd, $contents );> fclose($fd);> chmod($filename, 0644); // <- line 1379> }>
What's up? Like I said-- the pages are generating just fine-- but the > chmod error message is mixing into the output so it looks bad.>
On this box I believe apache runs as root (--how can I tell for > sure?). My templates_c directory looks like this:>
drwx------ 42 nobody nobody 4096 May 28 19:48> templates_c>
THANK YOU-->
best,> Eric Mueller



--
Smarty General Mailing List (http://smarty.php.­net/)
To unsubscribe, visit: http://www.php.net/­unsub.php


Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или УК РФ.


QAIX > PHP web-programming > [SMARTY] permissions hell 30 May 2002 21:37:22

see also:
CDO yahoogroups mail problem
FW: Regarding cast functions
APR PMC Chair - committers elligble to…
пройди тесты:
see also:
Abramovich to Give Chelsea Away
Watch out the network trap
Trifle Matters

  Copyright © 2001—2008 QAIX
Idea: Miсhael Monashev
Помощь и задать вопросы можно в сообществе support.qaix.com.
Сообщения об ошибках оставляем в сообществе bugs.qaix.com.
Предложения и комментарии пишем в сообществе suggest.qaix.com.
Информация для родителей.
Write us at:
If you would like to report an abuse of our service, such as a spam message, please .