Post by trapson » Wed Nov 24, 2010 6:36 pm

I have one small problem
When i moved my shop from my localhost to my webhosting something went wrong on the file and directory permissions.
Accordig to Gerrit on this forum every directory should be on 755 every file should be 644.

Saddly this does not work for me because i get the following errors (and much more)
Warning: unlink(/home/www/web173/web/webshop/system/cache/cache.category.0.2.0.1290178091) [function.unlink]: Permission denied in /home/www/web173/web/webshop/system/library/cache.php on line 14
Warning: fopen(/home/www/web173/web/webshop/system/logs/error.txt) [function.fopen]: failed to open stream: Permission denied in /home/www/web173/web/webshop/system/library/log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 16
Warning: unlink(/home/www/web173/web/webshop/system/cache/cache.category.1.2.0.1290178091) [function.unlink]: Permission denied in /home/www/web173/web/webshop/system/library/cache.php on line 14
Warning: fopen(/home/www/web173/web/webshop/system/logs/error.txt) [function.fopen]: failed to open stream: Permission denied in /home/www/web173/web/webshop/system/library/log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 16
Warning: unlink(/home/www/web173/web/webshop/system/cache/cache.category.10.2.0.1290178091) [function.unlink]: Permission denied in /home/www/web173/web/webshop/system/library/cache.php on line 14
Warning: fopen(/home/www/web173/web/webshop/system/logs/error.txt) [function.fopen]: failed to open stream: Permission denied in /home/www/web173/web/webshop/system/library/log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 16
Warning: unlink(/home/www/web173/web/webshop/system/cache/cache.category.14.2.0.1290178091) [function.unlink]: Permission denied in /home/www/web173/web/webshop/system/library/cache.php on line 14
Warning: fopen(/home/www/web173/web/webshop/system/logs/error.txt) [function.fopen]: failed to open stream: Permission denied in /home/www/web173/web/webshop/system/library/log.php on line 12


And so on and so on
What chmod's should i perform to get a safe but working webshop ?

And i was wondering if there is a possibility for importing customers incl their emailadresses so we can use opencart for mailinglists to the emailadresses we collected the past years in our "offline" store. Is there a Module or is it possible to import it directly into mysql database ?

Opencart 1.4.9.3


New member

Posts

Joined
Fri Sep 24, 2010 7:10 pm

Post by SapporoGuy » Wed Nov 24, 2010 7:34 pm

What did you do in regards to the permissions?
Did you do recursive permissions?

930sc ... because it is fun!


User avatar
Active Member

Posts

Joined
Mon Nov 01, 2010 7:29 pm

Post by trapson » Wed Nov 24, 2010 8:43 pm

there was an option checked that everything is uploaded with permissions 777 :-X

Problem is that some files are editted online only ....
Last edited by trapson on Wed Nov 24, 2010 8:43 pm, edited 1 time in total.

Opencart 1.4.9.3


New member

Posts

Joined
Fri Sep 24, 2010 7:10 pm

Post by fido-x » Wed Nov 24, 2010 8:43 pm

Delete all image files in "image/cache".
Delete all files starting with "cache." in "system/cache"
Delete "error.txt" in "system/logs".

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by trapson » Wed Nov 24, 2010 9:15 pm

fido-x wrote:Delete all image files in "image/cache".
Delete all files starting with "cache." in "system/cache"
Delete "error.txt" in "system/logs".
Done ( Only the images in image/cache not the submaps)
but still getting errors
Warning: fopen(/home/www/web173/web/webshop/system/cache/cache.product.bestseller.2.0.10.1290608030) [function.fopen]: failed to open stream: Permission denied in /home/www/web173/web/webshop/system/library/cache.php on line 41
Warning: fopen(/home/www/web173/web/webshop/system/logs/error.txt) [function.fopen]: failed to open stream: Permission denied in /home/www/web173/web/webshop/system/library/log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 16
Warning: fwrite(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/cache.php on line 43
Warning: fopen(/home/www/web173/web/webshop/system/logs/error.txt) [function.fopen]: failed to open stream: Permission denied in /home/www/web173/web/webshop/system/library/log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 16
Warning: fclose(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/cache.php on line 45
Warning: fopen(/home/www/web173/web/webshop/system/logs/error.txt) [function.fopen]: failed to open stream: Permission denied in /home/www/web173/web/webshop/system/library/log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 16
Warning: fopen(/home/www/web173/web/webshop/system/cache/cache.category.0.2.0.1290608030) [function.fopen]: failed to open stream: Permission denied in /home/www/web173/web/webshop/system/library/cache.php on line 41
Warning: fopen(/home/www/web173/web/webshop/system/logs/error.txt) [function.fopen]: failed to open stream: Permission denied in /home/www/web173/web/webshop/system/library/log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 16
Warning: fwrite(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/cache.php on line 43
Warning: fopen(/home/www/web173/web/webshop/system/logs/error.txt) [function.fopen]: failed to open stream: Permission denied in /home/www/web173/web/webshop/system/library/log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 16
Warning: fclose(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/cache.php on line 45
Warning: fopen(/home/www/web173/web/webshop/system/logs/error.txt) [function.fopen]: failed to open stream: Permission denied in /home/www/web173/web/webshop/system/library/log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 16
Warning: fopen(/home/www/web173/web/webshop/system/cache/cache.manufacturer.0.1290608030) [function.fopen]: failed to open stream: Permission denied in /home/www/web173/web/webshop/system/library/cache.php on line 41
Warning: fopen(/home/www/web173/web/webshop/system/logs/error.txt) [function.fopen]: failed to open stream: Permission denied in /home/www/web173/web/webshop/system/library/log.php on line 12

Opencart 1.4.9.3


New member

Posts

Joined
Fri Sep 24, 2010 7:10 pm

Post by fido-x » Wed Nov 24, 2010 9:36 pm

Sorry, should have said delete all files and folders in "image/cache".
trapson wrote:Warning: fopen(/home/www/web173/web/webshop/system/cache/cache.product.bestseller.2.0.10.1290608030) [function.fopen]: failed to open stream: Permission denied in /home/www/web173/web/webshop/system/library/cache.php on line 41
You didn't delete all the files starting with "cache." Basically, you need to delete all files in this folder except "index.html".
Warning: fopen(/home/www/web173/web/webshop/system/logs/error.txt) [function.fopen]: failed to open stream: Permission denied in /home/www/web173/web/webshop/system/library/log.php on line 12
And you didn't delete the error log file (error.txt).

The permissions problem on these cached files (and the error log file) is related to "ownership". You should have deleted the cached files before uploading to the server. Because you didn't, you are the "owner" of these files, subsequently the server "user" can't modify them.

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by trapson » Wed Nov 24, 2010 9:58 pm

I Did remove all cache files and i did remove the log file
I double checked it.
I did remove al other files in the cache (there where a lot *.tmp files)
I also did remove all the image files in the cache folder.


Is it possible some files should have more rights than the 644 ? Ore some folders more than the 755 ?

Because now the error's are worse:
Warning: mkdir() [function.mkdir]: Permission denied in /home/www/web173/web/webshop/catalog/model/tool/image.php on line 23Warning: imagegif() [function.imagegif]: Unable to open '/home/www/web173/web/webshop/image/cache/data/enra-500x500.gif' for writing: No such file or directory in /home/www/web173/web/webshop/system/library/image.php on line 47
Warning: fopen(/home/www/web173/web/webshop/system/logs/error.txt) [function.fopen]: failed to open stream: Permission denied in /home/www/web173/web/webshop/system/library/log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 16
Warning: mkdir() [function.mkdir]: Permission denied in /home/www/web173/web/webshop/catalog/model/tool/image.php on line 23Warning: imagegif() [function.imagegif]: Unable to open '/home/www/web173/web/webshop/image/cache/data/enra-250x250.gif' for writing: No such file or directory in /home/www/web173/web/webshop/system/library/image.php on line 47
Warning: fopen(/home/www/web173/web/webshop/system/logs/error.txt) [function.fopen]: failed to open stream: Permission denied in /home/www/web173/web/webshop/system/library/log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 16
Warning: fopen(/home/www/web173/web/webshop/system/cache/cache.product.bestseller.2.0.10.1290610266) [function.fopen]: failed to open stream: Permission denied in /home/www/web173/web/webshop/system/library/cache.php on line 41
Warning: fopen(/home/www/web173/web/webshop/system/logs/error.txt) [function.fopen]: failed to open stream: Permission denied in /home/www/web173/web/webshop/system/library/log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 16
Warning: fwrite(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/cache.php on line 43
Warning: fopen(/home/www/web173/web/webshop/system/logs/error.txt) [function.fopen]: failed to open stream: Permission denied in /home/www/web173/web/webshop/system/library/log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 16
Warning: fclose(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/cache.php on line 45
Warning: fopen(/home/www/web173/web/webshop/system/logs/error.txt) [function.fopen]: failed to open stream: Permission denied in /home/www/web173/web/webshop/system/library/log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 14

Opencart 1.4.9.3


New member

Posts

Joined
Fri Sep 24, 2010 7:10 pm

Post by SapporoGuy » Wed Nov 24, 2010 10:28 pm

If your cart is still in developer mode, why don't you just 777 all directories and files.
See if the thing will start.
Then start locking it down.

here's a googled page to explain the permission numbers http://www.zzee.com/solutions/unix-permissions.shtml

Disclaimer: I'm NOT A SECURITY person!!!
Got it?

Ok, from what I understand is that:
folders should be 755/777 (cache folder 777)
scripts that run: 755
images and template files: 644

7= god (root in *nix)
6= admin
5= moderator
4= us dumb people

so DON'T leave your site running on 777 for too long since you'll get PWND! like seriously own'd!

Actually, maybe just your cache directory needs to go 777 (don't do the system directory).
IF no worky to the 777 and then if it works move down to 755 then 644.

Luck dude!

930sc ... because it is fun!


User avatar
Active Member

Posts

Joined
Mon Nov 01, 2010 7:29 pm

Post by trapson » Wed Nov 24, 2010 11:23 pm

SapporoGuy wrote:If your cart is still in developer mode, why don't you just 777 all directories and files.
See if the thing will start.
Then start locking it down.

here's a googled page to explain the permission numbers http://www.zzee.com/solutions/unix-permissions.shtml

Disclaimer: I'm NOT A SECURITY person!!!
Got it?

Ok, from what I understand is that:
folders should be 755/777 (cache folder 777)
scripts that run: 755
images and template files: 644

7= god (root in *nix)
6= admin
5= moderator
4= us dumb people

so DON'T leave your site running on 777 for too long since you'll get PWND! like seriously own'd!

Actually, maybe just your cache directory needs to go 777 (don't do the system directory).
IF no worky to the 777 and then if it works move down to 755 then 644.

Luck dude!
Everything on 777 works like a charm but that is obviosly not an option.
I do know what the chmod rights are but do not know (or/and cannot find) what opencart requires.

I opened up the cache to 777 and the errors are fewer

these are the only one left
Warning: mkdir() [function.mkdir]: Permission denied in /home/www/web173/web/webshop/catalog/model/tool/image.php on line 23Warning: imagegif() [function.imagegif]: Unable to open '/home/www/web173/web/webshop/image/cache/data/enra-500x500.gif' for writing: No such file or directory in /home/www/web173/web/webshop/system/library/image.php on line 47
Warning: fopen(/home/www/web173/web/webshop/system/logs/error.txt) [function.fopen]: failed to open stream: Permission denied in /home/www/web173/web/webshop/system/library/log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 16
Warning: mkdir() [function.mkdir]: Permission denied in /home/www/web173/web/webshop/catalog/model/tool/image.php on line 23Warning: imagegif() [function.imagegif]: Unable to open '/home/www/web173/web/webshop/image/cache/data/enra-250x250.gif' for writing: No such file or directory in /home/www/web173/web/webshop/system/library/image.php on line 47
Warning: fopen(/home/www/web173/web/webshop/system/logs/error.txt) [function.fopen]: failed to open stream: Permission denied in /home/www/web173/web/webshop/system/library/log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 16
Warning: mkdir() [function.mkdir]: Permission denied in /home/www/web173/web/webshop/catalog/model/tool/image.php on line 23Warning: mkdir() [function.mkdir]: No such file or directory in /home/www/web173/web/webshop/catalog/model/tool/image.php on line 23Warning: mkdir() [function.mkdir]: No such file or directory in /home/www/web173/web/webshop/catalog/model/tool/image.php on line 23Warning: imagejpeg() [function.imagejpeg]: Unable to open '/home/www/web173/web/webshop/image/cache/data/camera/accesoires/KingstonSD2GB-38x38.jpg' for writing: No such file or directory in /home/www/web173/web/webshop/system/library/image.php on line 43
Warning: fopen(/home/www/web173/web/webshop/system/logs/error.txt) [function.fopen]: failed to open stream: Permission denied in /home/www/web173/web/webshop/system/library/log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 16
Warning: mkdir() [function.mkdir]: Permission denied in /home/www/web173/web/webshop/catalog/model/tool/image.php on line 23Warning: mkdir() [function.mkdir]: No such file or directory in /home/www/web173/web/webshop/catalog/model/tool/image.php on line 23Warning: mkdir() [function.mkdir]: No such file or directory in /home/www/web173/web/webshop/catalog/model/tool/image.php on line 23Warning: imagejpeg() [function.imagejpeg]: Unable to open '/home/www/web173/web/webshop/image/cache/data/camera/accesoires/KingstonSD2GB-120x120.jpg' for writing: No such file or directory in /home/www/web173/web/webshop/system/library/image.php on line 43
Warning: fopen(/home/www/web173/web/webshop/system/logs/error.txt) [function.fopen]: failed to open stream: Permission denied in /home/www/web173/web/webshop/system/library/log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in /home/www/web173/web/webshop/system/library/log.php on line 16

Opencart 1.4.9.3


New member

Posts

Joined
Fri Sep 24, 2010 7:10 pm

Post by SapporoGuy » Thu Nov 25, 2010 12:29 am

ALL 777 is not an option.
It is just for testing to eliminate your problems.

Looks like there is a mkdir problem. Could be server related but you said is working like a charm.
Which is it?

Did the cart work on the host without modifications?

How about:
1)erase what you uploaded
2) fresh install on host
3) dump db on local machine, import the db to host
4) copy over images and modifications

930sc ... because it is fun!


User avatar
Active Member

Posts

Joined
Mon Nov 01, 2010 7:29 pm

Post by trapson » Wed Dec 01, 2010 9:12 pm

Everything is now on 755 or 644 only the system/cache folder should be on 777 otherwise i get all the errors

Opencart 1.4.9.3


New member

Posts

Joined
Fri Sep 24, 2010 7:10 pm

Post by bwoose » Mon May 09, 2011 10:13 pm

I'm getting exactly the same error. The files that come up in the initial checklist during install were all changed to 777. Once I'd installed everything, I changed them back to 757. There's no way I can leave them at 777.

How was this problem resolved before?

Is it my hosting company?

Cheers

Newbie

Posts

Joined
Mon May 09, 2011 10:09 pm

Post by bwoose » Mon May 09, 2011 11:24 pm

I think I've sorted it - changed system/cache to rwx r-x rwx

cheers.

Newbie

Posts

Joined
Mon May 09, 2011 10:09 pm

Post by tarangv » Tue Feb 07, 2012 9:23 pm

Hi All..
I am trying to implement a code for calculating "percentage amount saved" for products with Special price.
Ex:
MRP:2000
Offer Price: 1500
Get 25% Off!

the code work fine when i provide special price for products but when gives a bunch of errors for products without special price. I have also given a condition in product.tpl so that this should show only for products with special price.
Still i get all these errors..

Warning: fopen(D:\inetpub\vhosts\storeadda.com\httpdocs\logs/error.txt) [function.fopen]: failed to open stream: No such file or directory in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 16

Warning: fopen(D:\inetpub\vhosts\storeadda.com\httpdocs\logs/error.txt) [function.fopen]: failed to open stream: No such file or directory in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 16

Warning: fopen(D:\inetpub\vhosts\storeadda.com\httpdocs\logs/error.txt) [function.fopen]: failed to open stream: No such file or directory in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 16

Warning: fopen(D:\inetpub\vhosts\storeadda.com\httpdocs\logs/error.txt) [function.fopen]: failed to open stream: No such file or directory in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 16

Warning: fopen(D:\inetpub\vhosts\storeadda.com\httpdocs\logs/error.txt) [function.fopen]: failed to open stream: No such file or directory in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 16

Warning: fopen(D:\inetpub\vhosts\storeadda.com\httpdocs\logs/error.txt) [function.fopen]: failed to open stream: No such file or directory in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in D:\inetpub\vhosts\storeadda.com\httpdocs\system\library\log.php on line 16

I have cleared all cache..but nothing helps..can anyone please help me out here..? I have basic knowledge of php but i am new to opencart..
Pleasssss help...

Newbie

Posts

Joined
Sat Jan 07, 2012 9:19 pm

Post by wbaja » Fri Sep 15, 2017 9:51 am

setenforce 0
all good to go.

Newbie

Posts

Joined
Tue Sep 05, 2017 1:20 am
Who is online

Users browsing this forum: No registered users and 23 guests