I've got a problem when i try to install Symfony 2:
I extract the content of the tgz file into var/www/html directory and then i go on http://127.0.0.1/symfony/web/config.php and it says that i need to change the permissions of app/cache/* and app/logs/*. The problem is that I tried all the solutions in the doc
Which solutions exactly did you try? Did you chmod those folders?
If your web server and command line user are different, that can also cause problems with those two folders. Check the docs for their umask solution and see if that helps.
I had the same problem and SELinux was responsible.
To figure out if SELinux is the source of your problem, turn it off by typing: setenforce Permissive on the command line.
If the script works, then you have to configure SELinux properly.
Related
Whenever I run any yum command I am getting the below error -
Repository packages-microsoft-com-prod is listed more than once in the configuration
Any ideas to resolve the issue ?
Repository packages-microsoft-com-prod is listed more than once in the configuration
HDP-2.6 | 2.9 kB 00:00:00
HDP-UTILS-1.1.0.21 | 2.9 kB 00:00:00
Updates-ambari-2.5.2.0 | 2.9 kB 00:00:00
https://packages.microsoft.com/rhel/7/mssql-server/repodata/repomd.xml: [Errno 14] curl#60 - "Peer's certificate issuer has been marked as not trusted by the user."
Trying other mirror.
In the folder /ect/yum.repos.d you have two or more files.repo with the same repository name [packages-microsoft-com-prod]. I had the same problem and I have to delete one of the files, which was irrelevant to my os. And then I understood that that was a not good idea.
Find the packages that are related to another, in this case, files that relate to Microsoft and open them in your favorite editor. The file is probably named different, but the contents will be the same.
[packages-microsoft-com-prod]
name=packages-microsoft-com-prod
baseurl=https://packages.microsoft.com/rhel/7/prod/
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc
If this is the case, then it is safe to delete one of them. But if they are different, I wouldn't touch them. You could probably rename one of them, but I'm not sure if that would break something important.
First of all, the specific repository is not the problem, meaning that normally with third party repos the general message should look like this:
Repository XXX is listed more than once in the configuration
If that happens, the problem solves just by deleting the files related to that repository in the location etc/yum.repos.d/
You are able to delete such files by typing:
sudo rm -rf XXX.repos
in the terminal, in that location. You also got to type:
yum clean all
or
dnf clean all
depending on which command is triggering the problem.
Also, the repository or the app is not usually the problem. This is due to a bug according to the official site of RedHat.
Finally if you want to uninstall the app, you gotta run the same command to delete files on the locations:
var/cache/dnf
var/cache/log
Example:
sudo rm -rf XXX
rm is the command to remove files using the terminal, while rmdir is for deleting directories.
by using rf you are forcing the deletion, even when the files chosen are protected or the directories filled with protected and/or unprotected files, for which you might want to be careful with such command.
NOTE: Just for THIRD-PARTY repos.
Sorry if this is answered elsewhere, or requires a trick.
I have installed openCPU on an ubuntu xenial-16.04 instance. I'd like to lengthen the timelimit.post value as instructed in the /etc/opencpu/server.conf file. Trouble is I can't find it.
ubuntu#ip-x-x-x-x:/usr/lib/opencpu$ ls -a
. .. library rapache scripts
Maybe please check again to see if you don't find /etc/opencpu/server.conf in the expected directory - i.e. because, as above in your output of ls -la /etc/opencpu/, the server.conf file is listed being there. Note though the owner is root so take that into account when you try to open+edit the file.
I have created a folder to the default server at /var/www/default and everything works as expected.
Inside that folder I made a symlink to ~/WebstormProjects/my-project, using the common ln -s.
It worked for a while, and the last time I updated using apt-get, nginx doesn't follow anymore the symbolic link, which gives me a 404 error, not even listing the symlinks as it used to do.
Tried using the disable_symlinks directive, setting it to off, and nothing happened. Also followed the steps in this link and still nothing. Also added myself to the www-data user, nothing.
But if I edit nginx.conf by changing the user directive to my own user and restarting the server does work, but I know that's a very bad practice and some day in the future it will not allow PHP-FPM to work.
So, what can I do to make nginx follow symlinks, without changing the owner of my source directories? BTW, I'm using Ubuntu 14.04.3 and nginx 1.4.6 installed via package manager.
It was just a problem with permissions:
chmod 755 /home
chmod 755 /home/user
Got previous commands from this answer.
Today I updated my webserver, and while I do have a backup, I wish to resolve the following issue.
After a reboot after the apt-get update and apt-get upgrade, NGINX started to ignore the virtual-hosts.
The domains are still operational, but they are directed to the /usr/share/nginx/www/html/index.php file apparently, which contains: 'phpinfo();' in php tags.
The 'default' file for virtual-hosts and original conf settings are not present, only my customized nginx.conf. Therefore I have already ran out of possible issue's I can think of.
After the upgrade it seems that indeed some files in etc/nginx/ were changed, I replaced all files in there with my backup and it works just fine again.
Not much of an answer maybe, but if you have a backup, than you can fix the issue.
And it at least gives you a starting point as for where to look to fix the issue by hand.
SOLVED: See my answer below
I'm experiencing the same issue that Austin Hyde experienced in this question. I have an SQLite database that I can read, but not write.
Specifically, I'm getting General error: 8 attempt to write a readonly database in /var/www/html/green/database.php on line 34
My issue diverges from his as follows:
-As recommended in the answers to his question, I've made the database world-writeable, as well as the folder in which the database resides, with no luck. I've also set the owner of the database to "apache" as well as "nobody", without success.
-I've set the entire path set 777, beginning at /var (which I hate to do), no joy.
-I've messed about with SELinux (I'm running Fedora 12) to let httpd do whatever it wants; nothing.
I feel that I'm almost certainly missing something simple here, but I'm out of ideas.
What permissions need to be on an SQLite file in order to allow PHP / Apache to read and write to it via PDO?
Edit: Another related question, adding weight to the hypothesis that I've got a write permissions conflict somewhere.
For those who can not afford to disable SELinux entirely, here is the way to go.
To make a directory (say rw_data) and all it's content writable to any process running in httpd_t domain type ie. web-server processes, use following command as root.
chcon -R -t httpd_sys_content_rw_t "/var/www/html/mysite/rw_data/"
you can check SELinux context labels with following command :
ls -Z /var/www/html/mysite | grep httpd_sys_content_rw_t
This works on Fedora 16, should work on other SELinux enabled distros too.