Twig cache permissions - wordpress

I just worked with Windows 7 before and now I'm working with MAC OS. I cloned my project (it works with Twig and wordpress and I'm using a virtual machine via vagrant) and everything should work but when I enter the website it gives me the following message:
Uncaught exception 'RuntimeException' with message
'Unable to create the cache directory (/vagrant/myProject/cache/c2/94).'
in /vagrant/myProject/wp-content/.../libraries/Twig/Environment.php:1199
I guess it is some kind of problem about permissions but I don't know how to fix it exactly. Any help? Thank you.

As soon as you created a /vagrant directory, I think default permissions are root.
You can try:
sudo mkdir /vagrant/myProject/cache
sudo chown -R $USER:staff /vagrant
And then try again (assuming your current user runs the apache server).
If this does not work, please do:
ls -l /vagrant
and:
ls -l /vagrant/myProject/cache/
And try to set permissions so the cache permissions are the same.

Related

Trying to add image in Git add but keep getting the following message? I tried restarting/reloading git and closing VS Code but nothing worked

That is:
hashanp#DESKTOP-9E00J4S: ~/cats-cakes$ git add .
error: open("img/cake.jpg"): Permission denied
error: unable to index file img/cake.jpg
fatal: adding files failed
Trying to add image in Git add but keep getting the following message? I tried restarting/reloading git and closing VS Code but nothing worked.
That looks like a git bash session on Windows, or a WSL session.
If you can not easily identify the process which keeps an handle to that file, preventing another program (like git) to access it, I would:
reboot
restart my git bash or WSL2 session
try to add img/cake.jpg before opening any IDE.
Since it is an Ubuntu session, I would also try, for tesdting:
sudo chmod -R 755 img
That way, the folder img will be accessible.

zsh permission denied when accessing my home directory

/Users/myname
zsh: permission denied: /Users/myname
I already gave the terminal full disc access and restarted my mac but it won't let me access this directory.
You need to enable auto_cd. Add this to your ~/.zshrc:
setopt auto_cd
If you execute the command /Users/myname, it doesn't make sense, it's like asking a folder to execute.
You probably want to change directory, so cd /Users/myname
Use following command and enter password when promoted (Administrator mode)
sudo su
After this you can run script which is showing permission denied messages while accessing any directory or file

PCL execution error

I'm fairly new to the PCL and linux in general. I'm having trouble following the examples in documentation. None of the examples execute.The code compiles fine and a executable is generated. But I keep getting a permission denied error. The usual chmod and chown dont work. I've tried reinstalling PCL. What am I missing here ?
Here is the output from terminal https://www.dropbox.com/s/pjv8utctnokpihd/error.txt
From the dump you provide it looks like you are working in a mounted disk (/media/chaitanya/); possibly it was mounted with noexec or something. Try running mount to see.
Alternatively try working in your home directory:
cd ~
cp -r /media/chaitanya/work/learn-pcl/ ./
etc.

JMS\SecurityExtraBundle complains about permission errors under Fedora 18

I have just upgraded my development system to Fedora 18-Beta. Just after this, my Symfony 2 projects stopped working, stating that JMSSecurityExtraBundle is trying to run grep, which exits with non-success status code of 2.
It seems that the Fedora guys have changed some context defaults for the httpd package. According to /etc/selinux/targeted/contexts/files/file_contexts:
/var/www(/.*)?/logs(/.*)? system_u:object_r:httpd_log_t:s0
they have changed the default context of all files in any directory called logs under /var/www. As some vendor directories contain .git dirs, which eventually contain a directory called logs, they will be automatically labeled as httpd_log_t.
The solution to change this, is to issue this command:
# semanage fcontext -a -t httpd_sys_content_t '/var/www(/.*)?/\.git/logs(/.*)?'

cant start mongodb strange behavior permission denied as root

Im running as root on a smartos64 machine.
My database is at /data/db
Mongod is at /mongo/bin/mongod
I get a 'permission denied' error with no further details when running either
- run ./mongo/bin/mongod or
- sudo ./mongo/bin/mongod
I tried changing permissions with chown on /data/db, but I still get this behaviour. How would I start mongo?
What build of Mongo did you download? I believe SmartOS64 is a derivative of Solaris, so I would try a Solaris build from the Mongo download site. If that doesn't work, you may want to build it from source.

Resources