Page 1 of 1

Permission errors

Posted: Wed Nov 24, 2010 6:36 pm
by trapson
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 ?

Re: Permission errors

Posted: Wed Nov 24, 2010 7:34 pm
by SapporoGuy
What did you do in regards to the permissions?
Did you do recursive permissions?

Re: Permission errors

Posted: Wed Nov 24, 2010 8:43 pm
by trapson
there was an option checked that everything is uploaded with permissions 777 :-X

Problem is that some files are editted online only ....

Re: Permission errors

Posted: Wed Nov 24, 2010 8:43 pm
by fido-x
Delete all image files in "image/cache".
Delete all files starting with "cache." in "system/cache"
Delete "error.txt" in "system/logs".

Re: Permission errors

Posted: Wed Nov 24, 2010 9:15 pm
by trapson
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

Re: Permission errors

Posted: Wed Nov 24, 2010 9:36 pm
by fido-x
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.

Re: Permission errors

Posted: Wed Nov 24, 2010 9:58 pm
by trapson
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

Re: Permission errors

Posted: Wed Nov 24, 2010 10:28 pm
by SapporoGuy
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!

Re: Permission errors

Posted: Wed Nov 24, 2010 11:23 pm
by trapson
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

Re: Permission errors

Posted: Thu Nov 25, 2010 12:29 am
by SapporoGuy
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

Re: Permission errors

Posted: Wed Dec 01, 2010 9:12 pm
by trapson
Everything is now on 755 or 644 only the system/cache folder should be on 777 otherwise i get all the errors

Re: Permission errors

Posted: Mon May 09, 2011 10:13 pm
by bwoose
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

Re: Permission errors

Posted: Mon May 09, 2011 11:24 pm
by bwoose
I think I've sorted it - changed system/cache to rwx r-x rwx

cheers.

log.php Errors

Posted: Tue Feb 07, 2012 9:23 pm
by tarangv
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...

Re: Permission errors

Posted: Fri Sep 15, 2017 9:51 am
by wbaja
setenforce 0
all good to go.