I need to edit my php.ini file so I can upload large sql files into MySQL, but I don't know how to do it.  If I go to var/www/html and try and drag-and-drop phpinfo.php there it won't let me (not enough permissions).   Can someone please tell me how to edit the permissions of the folder so I can add files to it? (terminal method is preferred, but UI is fine too).
2993
I want to stop having to use sudo everytime I work in /var/www. How can I do that? I simply want to put all of my sites into this directory and work with them without too much pain.
15347
Does anyone know of a good method for editing PDFs in PHP? Preferably open-source/zero-license cost methods. :)  I am thinking along the lines of opening a PDF file, replacing text in the PDF and then writing out the modified version of the PDF?  I have programmatically created PDF files in the past using FPDF, but found it a little unwieldy at times.
11833
Having installed the web server is there a simple way to set a user able to use the graphic interface to copy files and directories to the local web server /var/www  I gave myself administrative privileges in Ubuntu but it still doesn't allow copies.
79962
I tried finding this on here, but couldn't so sorry if it's a duplicate.  Say I have 2 groups and a user: group1, group2, user1 with the following structure: group1 is a member of group 2, user1 is a member of group1  Now say I have the following files with relevant permissions  file1 root:group1 660 file2 root:group2 660   Now when I log into user1, I'm able to edit file1, but not edit file2. Short of adding user1 to group2, is there any way of doing this? or is there no way?  I'm using Ubuntu btw.
10
For some reason I can't change the file permissions of my var/www folder or anything else inside it. I've tried using gksu-nautilus to change the permissions but it doesn't work. When I open the properties window, and select a different level of permission for myself, it instantly switches back to the previous setting.  Any idea of how to fix this?
70828
I want to do:  echo "something" &gt;&gt; /etc/config_file  But, since only the root user has write permission to this file, I can't do that. But the following also doesn't work.  sudo echo "something" &gt;&gt; /etc/config_file   Is there a way to append to a file in that situation without having to first open it with a sudo'd editor and then appending the new content by hand?
76790
I've looked at dozens of other questions and references on the web - and by all my calculations, my setup should work, but it doesn't.  I have nginx installation with php-fpm.  If I try to access a .php file, it runs correctly and I get the correct results.  I got this in my config file:  location ~ \.php$ {     try_files $uri =404;     fastcgi_pass unix:/var/run/php5-fpm.sock;     include fastcgi_params;     fastcgi_param SCRIPT_FILENAME  $document_root$fastcgi_script_name; }   Now, I want to setup my web app so that /somedir/file automatically executes /somdir/file.php while still displaying /somdir/file in the browser's address bar.  So I modified my config to contain the following:  location / {     try_files $uri $uri/ $uri.php?query_string }   This kind of works, that is, the server does access the .php file.  Yet, instead of executing it using the existing location ~ \.php$ block above, it simply spits the php source code as the download into the browser.  If I append the .php manually to the requested URL, then the php is executed.  It feels as if once the server matches try_files to $uri.php, it then does not do another pass at locations to see that what it needs to do with the php files.  I tried putting the php block above and below the location /, but it makes no difference.  How can I get the php to be executed?
60970
As it required root access to edit, I've opened a init.txt file using sudoedit, but I don't see how to save my changes. I also see lots of things like ^X instructions at the bottom of the terminal which I'm clueless about.
11898
I'm gearing up to deploy a Drupal 7 site and I can't find any documentation about what the recommended security-conscious file and directory permissions should be set to.  Specifically default/files/ (also sub directories?), settings.php, .htaccess and anything else I should be aware of.
38456
I created a block and put in some invalid PHP code resulted in entire site not accessible at all.   I'm fairly new to Drupal and I'm not a back-end programmer either. Much appreciated if you can provide a clear step-by-step guide on how to delete that particular block directly from the Database (PhpMyAdmin).
112110
How do I set a variable in the configuration file setting.php and use it from code?
94205
Having worked with Linux for years, and finding myself with some free time, I decided to revisit some basics. So I re-read the stuff about permissions (without checking source code), and its special cases for folders, and came up with a new (to me at least...) way of thinking about folder permissions (for a specific user/group/others): I imagine a folder as a table with two columns, like so:  filename | inode     foo      | 111   bar      | 222    The read permission means you can read (and list)  the left column of the table, the write permission corresponds to adding and removing entries to the table, and the execute permission corresponds to being able to translate from file name to inode; i.e. you can access the contents of the folder.  I did some experiments, and the results are all consistent with this "worldview" of mine, but one conclusion seems inescapable: that a folder with permissions d-w-------, is totally useless. Elaborating: you can't list its contents, you can't read any files you know exist inside (because you can't translate names into inodes), you can't remove or rename or add files, because again that would imply translation, and you can't even add hardlinks (because, I surmise, that would mean adding a name as well as an inode number, which means you would know both, which in turn, again surmising, violates the purpose of unsetting execution permission). And of course, if there are files inside one such folder, then you can't delete that folder either, because you can't delete its contents.  So... I would like to ask two questions:    Is this analogy of mine correct, or is it a big blunder?  Irrespective of the previous answer, is there any situation where having a folder with permissions as described is appropriate?
96562
I tried restarting the Mysql server but its not working for me. I am sure the server is running and the permissions on the folder /var/lib/mysql/ are correct (777).  When i tried to open the file mysql.sock, its giving me an error saying the file may be corrupt.  Please help me to log on to the mysql server.
90818
I have been searching for a solution but nothing seems to work.  I have a single Drupal 6 website up on this server.    Server:Ubuntu 12.04 Apache/2.2.22 (Ubuntu) 5.3.10-1ubuntu3.8 MySQL 5.5.32 Drupal 6  Here is a link to my Apache2 and MySQL error files and my config file for MySQL.  Please have a look.  Those files are huge, that is why I linked to them instead of pasted them in here.  If I need to I can paste in here.  Just let me know.  Thanks.  I have done a lot of searching.  I mostly try to Google the errors themselves but can't seem to find the right solution.  I think I have narrowed it down to a problem with innodb but that is it.  I check the tables in the error log and phpMyAdmin say they are ok and I repair them anyway and still get the crashing.  When my site crashes, I have to restart Apache and then restart MySQL and then the site comes back up.  It has been crashing 2 - 6 times a day.  Any help would be greatly appreciated.  Thanks.
25307
Sorry for the basic question - I'm a .NET developer and don't have much experience with LAMP setups.  I have a PHP site that will allow uploads to a specific folder. I have been told that this folder needs to be owned by the webserver user for the upload process to work, so I created the folder and then set permissions as such:  chown apache:apache -R uploads/ chmod 755 -R uploads/   The only problem now is that the FTP user can not modify the uploaded files at all.  Is there a permission setting that will allow me to still upload files and then modify them later as a user other than the webserver user?
104633
I'm trying to edit the hosts file (C:\Windows\System32\drivers\etc\hosts), because I want to setup a local redirect for my website (like I've always done in XP). However, I can't save the changes!  I have taken ownership, I have allowed my account full access and have tweaked every other setting I can think of. Every time I edit and save it, "Access is denied" pops up.  How do I get past this?
35370
I have a PHP application (Wordpress) in the root folder of my site, and all requests to the site run through it happily.   However, I have a subfolder, _links, which I would like to use to execute another, different php script.  Eg, if a user goes to site.com/_links/221312, then the index.php script from /_links takes over.  I formerly used a .htaccess file to achieve this, but since moving to nginx I can't make it work.   Here is the old .htaccess file.  RewriteEngine On RewriteRule    ^([0-9]+)/?$    index.php?linkid=$1    [NC,L]   Obviously, I'm passing the last bit of the URL to the script as a parameter.  Here is my nginx config. Requests to eg site.com/_links/23423 are picked up by if (!-e $request_filename) and rewritten to /index.php?q=/_links/23423 instead of being picked up by the location block.   server {         listen  127.0.0.1:8080;         server_name site.com www.site.com m.site.com;          root /var/www/site;         location ^~ /_links/ {                 add_header location 1;                 root /var/www/site/_links;                 rewrite "^([0-9]+)/?$" /index.php?linkid=$1 break;                 location ~ \.php$ {                         try_files $uri =404;                         fastcgi_pass unix:/var/run/php5-fpm.sock;                         fastcgi_index index.php;                         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;                         include fastcgi_params;                  }          }         index index.php index.html;         if (!-e $request_filename)             {                 rewrite ^(.+)$ /index.php?q=$1 last;             }         location / {                 try_files $uri $uri/ =404;         }          # pass the PHP scripts to FastCGI server listening on the php-fpm socket         location ~ \.php$ {                 try_files $uri =404;                 fastcgi_pass unix:/var/run/php5-fpm.sock;                 fastcgi_index index.php;                 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;                 include fastcgi_params;          }         access_log /var/log/nginx/site.com.access.log;         error_log /var/log/nginx/site.com.error.log notice; }   I'm really confused. What's going on here?