PHP: Yii: move_uploaded_file(/IMG-8746.jpg): failed to open stream: Permission denied - yii

Don't know how to fix this error, eventough I read several articles and watched a few videos. I already made my #web directory read- and writeable with chmod 777 -R.
I am able to upload files in different locations out of the #web folder. Unfortunately, I am unable to display pictures at my website, which are out of the #web directory.
Please help :)

Please make sure your path should be proper with needed permission. Try with adding static path and check if it works then add dynamic path

Related

OSError: Could not find kaggle.json. Make sure it's located in C:\Users\<username>\.kaggle. Or use the environment method

I apologize in advance if this question has already been answered. I've looked at several posts and have yet to find the info to resolve my issue.
I'm trying to work with Kaggle's API to download some data sets. I've installed Kaggle with pip3 and have downloaded the Kaggle.json file and moved it to c:/users//appdata/local/programs/pythoncodingpack/lib/site-packages/kaggle. I did not specifiy this particular path, this is where pip3 automatically saved the kaggle folder. The .json folder is definitely in there, but when I try to run the API command "kaggle datasets download -d victorsoeiro/netflix-tv-shows-and-movies" I get the error included in the title.
What I have noticed is that there is an executable file called kaggle.exe on the path c:/users//appdata/local/programs/pythoncodingpack/scripts/kaggle.exe. I was wondering if maybe the computer was finding that file and stopping before finding the kaggle folder on the ./lib/site-packages/kaggle/ path.
I have tried granting permission with the chmod 600 command on the ./kaggle/kaggle.json path and I have tried including the whole path when executing the command. Nothing I've done so far has resolved the error when I try to run the API command. Can anyone help out?

Getting jQuery Error on using ezzeelfinder

Hi I am trying to use ezzeelfinder as file manager
I am getting the following error:
TypeError: jQuery(selector).elfinder is not a function
Query(selector).elfinder().elfinder("instance");
I am using the exact code from the Yii extension website. I do not know what is going wrong, I am using windows 7 with Apache (XAMPP)?
Continuing our discussion from previous ElFinder question let me try to explain more.
Can you look at what is inside elfinder.min.js file included from assets directory (you can use Firebug: Net tab > expand request of /assets/abcdef/elfinder.min.js > Response tab)? It wasn't a script (but some HTML with error) when I've reproduced a problem with such error. So if this JavaScript file is not included then there is no elfinder method extending jQuery and the error message you receive is fair.
Seems to me that this one is a permission issue. elfinder.min.js file cannot be published to assets directory for some reasons. Make sure that all permissions to elfinder.min.js file WITHIN extension's directory are granted. After granting the permissions to this file clean up assets directory and try again. At last, check whether the script has been really published to assets directory and has granted permissions there.
I don't know whether it will be helpful for you but I have an archive with demo files that can demonstrate extension's basic usage (made under Ubuntu though): http://ezze.org/yii/ezzeelfinderdemo.zip
Extract the contents of this archive to the root folder of Yii basic application created from command line using yiic script.

Yii - How to cause Yii to republish to the assets folder

Yii question.
On my development machine, the required JQuery files for the application were present in a subfolder under the assets folder. However, when I copied the application to my test server, JQuery files were missing in the folder yii looked for them. I kept getting errors such as '../assets/db0e5a94/jquery.ba-bbq.js' 404 not found, etc.
I emptied the assets folder, and now all my CSS files etc. are reported missing. Is there any way I can cause Yii to republish to the assets folder?
Thanks!
Simply delete all sub-directories in the assets folder and clear your browser cache. Do not delete the assets directory or you will have to set the write permissions again.
in components/Controller.php add the following function:
protected function beforeAction($action){
if(defined('YII_DEBUG') && YII_DEBUG){
Yii::app()->assetManager->forceCopy = true;
}
return parent::beforeAction($action);
}
A simple way to have your assets back is to manually copy them from framework directory back. I know it is not the best way to do it, but it should help you while you find a better solution.
Ask your hosting service provider to disable SAFE_MODE in php.ini. Then remove asstes directory together with its sub files and folders and create it again. Make sure that you set CHMOD to 0777 for the new directory you just created.
I also had this same problem. After uploading the respective files to the server i changed the file permission to 755 in the server. Then it worked.

mac app store error

I've been trying to submit my app to the mac app store and I've been trying to figure out how to solve this issue:
Files Only Readable By The Root User - The installer package includes files that are only readable by the root user. This will prevent verification of the application's code signature when your app is run. Ensure that non-root users can read the files in your app.
I haven't been able to fix this problem for a while and does anyone have a solution?
In my case, none of the files were owned by root, but one had no read permissions for group and everyone, but only for my user. I found this by using this cmd in Terminal:
ls -lR /path/to/app
I then searched for "-----" inside the output from the ls command, which found the problematic file.
I had the same problem, but my solution was to run:
cd myApp.app
chmod a+rX *
This fixes the permissions and makes the Application Loader happy.
I found the answer:
I deleted some files that weren't readable by the system, files that showed a white blank icon
For anyone who has been banging their head on this one my experience is the error is erroneous or at best very misleading.
After looking over all the permissions then dragging files in and out of the bundle to test Application Loader the error magically disappeared and the same files with the same permissions ceased to give the same error.
This really isn't a solution but it may be important to know that this error may not be what it seems (tested on 10.9.4).

Joomla - Warning! Failed to move file error

I have found some solutions to this error and tried implementing them but none of which has worked and hope that some here at SO might have a different answer.
I get this error, "Warning! Failed to move file" when I try install modules into my new installation of Joomla here:
http://sun-eng.sixfoot.co.za
Here's some solutions I have tried to no avail:
http://forum.joomla.org/viewtopic.php?f=199&t=223206
http://www.saibharadwaj.com/blog/2008/03/warning-failed-to-move-file-joomla-10x-joomla-15x/
Anyone know of another solution to this please?
Thanks!
Go to Help -> System Info in your administrator backend and check your Directory Permissions tab to make sure everything is writable.
Also make sure your Path to Temp Folder is correct in Site -> Global Configuration.
Finally, check to make sure that the module isn't already installed. It's possible that some files already got copied or something and now your system is having problems overwriting them.
If none of this works, let us know if the error message specifies which file can't be moved. That would help figure out a solution.
In the configuration folder change the temporal folder location to /tmp (public $tmp_path = '/tmp';) or create your own temperate folder and set it to /myowntemp and change the file permission to 777. you are good to go .
This is typically a file permissions issue. If the system cannot write to the tmp directory within Joomla it will give you the "Warning Failed To Move File" error.
The typical solution is to make the directory wide-open, in general a bad practice but a quick fix. You log in to the Linux command line via a terminal (telnet or ssh) session and set the permissions of the directory.
# chmod -R 777 ./tmp
The better option is to find out what user/group the Apache server is running as and assign the permissions accordingly. For example, if Apache is running your site as the myuser:nobody user:group then you can open up write permissions for the group by changing ownership of the tmp folder and making it writable by anyone in the group:
# chgrp -R nobody ./tmp
# chmod -R 775 ./tmp
Security can be a pain to get set correctly if you don't know *nix commands and security settings, so most people just blast a huge hole in the security with chmod 777.
The next thing you'll probably run into is another error message about not being able to update a specific directory. Again, this is a permissions issue and is typically a piece of the file being unzipped into the administrator subdirectory. Depending on whether your installing a component, a module, or a complex plugin with multiple pieces you may need to open up one or more of these directories using the same approach as above. Here is the "blow a big open hole in security" method:
# chmod -R 777 ./administrator/
Or more selectively:
# chmod -R 777 ./administrator/components/
# chmod -R 777 ./administrator/modules/
If you are a linux user then it is very simple to solve. Just type the following command and try again to install plugin/entension.
sudo chmod -R 777 /var/www/html/my_joomla_folder
You can also refer this link for brief information regarding permission of each folder and file.
Cheers!!
In Joomla 3.x you should go to System->System Information to see directory permissions
If one or more directories that are listed are not "writable" then you should change the permission of those directories:
If you are using one of Linux distributions you can use this command
to give the directories read/write/execute permission:
sudo chmod 777 -R address_of_lampp_directory/lampp/htdocs/joomla_directory
I have had a similar issue today and found is was the permissions set on the 'temp folder'. To resolve I changed them to 777 and my plugin installs worked fine!!
Another thing to check is whether you actually have space on the disk. I had this error and discovered that the drive was 100% full. Removing some unused files fixed the problem.
One other thing to try if everything else is not working is to add the following to your .htaccess file:
php_value upload_max_filesize 10M
Make sure 10M covers the size of the file you are uploading - increase it if your file is 12Mb, for instance.
[Source]
This issue was solved like this.
On the configuration.php file change the tmp_path variable according to:
if you site is mysite.azurewebsites.net, the path should looks like
'C:\DWASFiles\Sites\mysite\VirtualDirectory0\site\wwwroot\tmp'
instead of
'C:\DWASFiles\Sites\mysite.azurewebsites.net\VirtualDirectory0\site\wwwroot\tmp'
Refer to the link: http://social.msdn.microsoft.com/Forums/en-US/windowsazurewebsitespreview/thread/2701eadc-9977-46ab-9c56-81a2234bdce4
I did it and every is working for every error problem with OSX, I use OSX version 10.9.2 and get many problems. The way to fix every error is
# cd /Applications
# chmod -R 777 ./XAMPP
some files might not change permission but the problem is gone.
you can create folder and upload fine and picture, including install plugin.