Kohana installation: Logs Directory is not writable. Can't change the root of the directory in the bootstrap.php - kohana

I've just installed kohana in my new project temp.loc
I type in the browser temp.loc and Environment Tests says:
Cache Directory The /work/temp.loc/wwwroot/application/cache/ directory is not writable.
Logs Directory The /work/temp.loc/wwwroot/application/logs/ directory is not writable.
I'm trying to change the path Kohana::$log->attach(new Log_File(APPPATH.'logs')); in bootstrap.php. BUt, after refreshing the browser, the Environment Test still shows the same path /work/temp.loc/wwwroot/application/logs/, the path is not refreshed. Why?

Don't change the location in bootstrap, that isn't needed. The reason you are receiving this error message is probably because those two directories aren't writable. If you are on Mac OSX or a linux environment you need to set those directory permissions to 777 i.e. "chmod 777 cache". Both are located on your application directory. This is a common issue that I have to resolve every time I install Kohana on a new server.

Related

location for application text file not in home directory

I use linux. I'm working on a project where an app I wrote is launched by my runlauncher. At that time the app looks for an environment variable on the sytem. This environment variable contains a path to a text json file. I want to put this file somewhere on the sytem, not in the home directory. Where would be the appropriate place?
The environment variable is GOOGLE_APPLICATION_CREDENTIALS. The app is a flatpak app.
TLDR: Where do I put things on the system that I can read from my application that are not in the home directory?
On Linux, you need super-user rights (or sudo) if you want to write file outside $HOME directory. If you have only user right, then only $HOME directory is writable.

Unable to create 'launch.json' file inside the '.vscode' folder ({0})

I'm on a linux machine running vscode. I am trying to do some debugging but whenever I try to select the environment configuration I get the message, "Unable to create 'launch.json' file inside the '.vscode' folder ({0})."
I suspect it could be a permissions thing but when I try to run vscode as an elevated user I am warned not to. Instead it advises that I can change the user data directory. Will this fix my problem?
After some digging, it turns out that the .vscode directory is created inside the root folder of each project added to vscode. To resolve the problem I had to create the folder manually and give permissions for vscode to write to the directory.

Laravel folder permission for not-yet made cache folders

I'm having an issue with directory permissions with Laravel when it comes to caching. Whenever it tries to upload a cache file to /var/www/laravel/storage/framework/cache/data/ it tells me that file_put_contents has no permissions.
To fix this I always do something like chmod -R 755 /var/www/laravel/storage/framework/cache/ but the problem here is that when it creates a new directory inside cache it does not inherit these chmod settings, thus giving me permission denied error again.
How can this be fixed permanently?
Edit:
Been thinking about letting it run as a cronjob regularly, but I'm not so sure that's a good way to deal with it.
You need to run chmod command with -R:
sudo chmod -R 755 storage
After installing Laravel, you may need to configure some permissions. Directories within the storage and the bootstrap/cache directories should be writable by your web server or Laravel will not run. If you are using the Homestead virtual machine, these permissions should already be set.
https://laravel.com/docs/5.5#installation

Changing file permission of a linux directory in install4j

I am new to install4j and am trying to change the file permission of a directory to 0750 on a project that I inherited. I am in the Define Distribution Tree screen, right click on the directory, select Edit Entry, and change the Unix mode to 750. I save the project. After running the new install (running as root), the file permission is set to 755 (default). Are there additional steps required? I looked for other spots where the file permission may have been explicitly set, but did not find any. Any ideas on what I did wrong and how to debug this? Thanks.

Can a OS Update Modify the Permission in a Directory?

I upgraded my Fedora box a few days ago. I went from Fedora 18, to Fedora 20 using fedup. This morning I noticed that when I tried to delete a zip file from one of my directories, I couldn't. Then I tried to create a directory, and I couldn't. I had to use sudo.
The directory where this is happening is the /var/www/html directory, which is the root directory of my server. Before doing the update I could modify the contents of this directory without any problem. I don't remember, but I may have changed the permission of the directory at some point to allow me to do this. Is it possible that the upgrade modified the permission of the html directory?
Please note that I'm not asking how to gain permission again, I've already modified the permission in the html directory. I just want to know if the reason for this happening was that the upgrade modified the permission on that directory.
Thanks.
The /var/www/html directory on Fedora is owned by the httpd package so yes, if that package got updated, then the permissions for that directory will be reset to whatever the package specifies.

Resources