Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Smarty ownership and permissions hell

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-04-2003, 04:14 PM
 
Light Speed Light Speed is offline
 

X-Adept
  
Join Date: Mar 2003
Posts: 921
 

Default Smarty ownership and permissions hell

Where can I change the default ownership for directories and files that smarty writes?

Afer a recent server move i am unable to modify template files through the admin pages. I get a permission denied error. My permissions are:

Template_c 777
admin/newsletter 777
X-Cart directory 755

I deleted all the files and directories in the templates_c directory hoping that would help but no. When I run the cart as a customer the cache files and folders are recreated in templates_c but they have
owner 99
group nobody
permissions 771

That doesn't seem right. I don't want to manually have to change folder chown and chmod all the time. I want smarty to write them correctly. What do I have to do. Help please I am going insane over smarty and permissions.....

I am also on a shared server and my directory at my web host has
owner=my plans username
group=my plan username

would it be possible to have smarty write the files and directories with that owner/group setting? Would that solve my permissions problem? Would that stop X-Cart from functioning with other server functions?
Reply With Quote
  #2  
Old 04-08-2003, 10:20 AM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

It sounds like the server is set up with a umask of 006.

I would ask your hosts to resolve this so that you can get true 0777 permissions on the files/directories.
__________________
ex x-cart guru
Reply With Quote
  #3  
Old 04-24-2003, 10:11 PM
 
Rich Z Rich Z is offline
 

Advanced Member
  
Join Date: Dec 2002
Location: Tallahassee, FL
Posts: 32
 

Default

I don't know if this is a similar problem, but I FINALLY have found the time to spend on my X-Cart, so I added in a logo and put in some new categories and products while in admin mode. When I went to user mode to look at my handiwork, I got a bunch of REALLY ugly error messages all over the screen:

Quote:

Warning: Smarty error: problem writing '../templates_c/N20/N2041962639/0.php.' in /home/serpenco/public_html/xcart/Smarty-2.1.1/Smarty.class.php on line 546

I tried playing around with the permission on the directories, but it didn't seem to help any. I too have moved to a new server, but I am leasing the box and have root access to it.

Any ideas on what went wrong?

Thanks!

Addendum:

I checked in the templates_c directory (which has permissions set to 777) and all of the subdirectories there are set to 771. Is that right?

BTW, I moved the domains from my old server to the new server via CPanel/WHM, if anyone is familiar with that. Owner and group are both my login in MOST directores, but a couple are "nobody nobody".

Sigh....
Reply With Quote
  #4  
Old 04-24-2003, 10:18 PM
 
Light Speed Light Speed is offline
 

X-Adept
  
Join Date: Mar 2003
Posts: 921
 

Default

Check ownership on templates_c and everything in it and make sure that the server owns it. Usally nobody/nobody
Reply With Quote
  #5  
Old 04-24-2003, 10:39 PM
 
Rich Z Rich Z is offline
 

Advanced Member
  
Join Date: Dec 2002
Location: Tallahassee, FL
Posts: 32
 

Default

Thanks. It looks like just about everything is owned by my logon (serpenco/serpenco). Should I change EVERYTHING in the xcart directory to nobody/nobody?
Reply With Quote
  #6  
Old 04-24-2003, 10:46 PM
 
Rich Z Rich Z is offline
 

Advanced Member
  
Join Date: Dec 2002
Location: Tallahassee, FL
Posts: 32
 

Default

Yahoo!!

That did it!

I changed ownership and group to nobody/nobody and it's working now!

Thanks for the help!!

BTW, I only changed templates_c and below. Is this going to bite me in the butt somewhere else with other files having the incorrect ownership?
Reply With Quote
  #7  
Old 04-25-2003, 07:22 AM
 
Light Speed Light Speed is offline
 

X-Adept
  
Join Date: Mar 2003
Posts: 921
 

Default

I can't remeber but I think there is one other directory that needs server ownership. Maybe something to do with the newsletter but i'm not sure. Hopefully Boomer or shan can help
Reply With Quote
  #8  
Old 05-27-2003, 01:26 PM
 
Klaas Klaas is offline
 

Member
  
Join Date: May 2003
Posts: 10
 

Default

I think i have a similar problem now. I did a fresh install with X-Cart Gold 3.4.1 but when finished i've got the following error:

Can't write template cache in the directory: //templates_c.
Please check if it exists, and have writable permissions.

So I checked permissions and they are set to 777 so this should be right. Group and owner are www.users instead of nobody.nobody. This is created by X-Cart self. What am I doing wrong here ?
Reply With Quote
  #9  
Old 05-27-2003, 03:25 PM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

try and run cleanup.php then without viewing your store ftp in , delete templates_c folder and recreate it via ftp, set it to 777 and then try your store again
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #10  
Old 05-27-2003, 05:14 PM
 
Klaas Klaas is offline
 

Member
  
Join Date: May 2003
Posts: 10
 

Default

Quote:
Originally Posted by shan
try and run cleanup.php then without viewing your store ftp in , delete templates_c folder and recreate it via ftp, set it to 777 and then try your store again

Ok did what you said, but with no luck. Still getting the same error.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:25 AM.

   

 
X-Cart forums © 2001-2020