file-permissions

How come my Apache can only access root owned files?

放肆的年华 提交于 2019-12-11 05:19:27
问题 Running apache on centos 6.4 and my web server can't see any files unless the root user creates or copies them. ps aux | grep apache shows that apache is running as apache user, not root. I tried chown apache:apache on the files. I even set chmod 777 on the files. -rwxrwxrwx. 1 apache apache 2300 May 15 17:46 example.php I still get an http 500 error, what else could be wrong? also even if I chown the file to root:root, it will not work, I need to actually cp file.php file.php as root before

How to store Python application data

血红的双手。 提交于 2019-12-11 05:06:39
问题 I'm creating a simple Python CLI tool, which lets the user add and delete tasks (the classic Todo app). This is just for my own use, but I want to get into the best practices of creating such applications. The data will be stored in a simple text file. Main question : Where should I store the data file? After doing some reading, I'm inclined to create a new folder in /var/lib and keep the data.txt file in that directory. Are there any drawbacks to that option? Follow up question : Since, by

PDF in PHP ZipArchive throwing errors, server permissions

风格不统一 提交于 2019-12-11 04:05:29
问题 I am collecting a number of files from the server and generating a ziparchive with PHP. All goes super well until I download the zip archive and try to open the file. The reader throws an exception "File type plain text document (text/plain) is not supported". The file is named correctly (c102.pdf). I presume the mime type of the file is getting messed up some how, but I'm not quite sure. php version 5.4.37 I should note that I'm using ubuntu 14.04 locally and my reader is the default

Google Drive API - Adding and Updating Permissions

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 03:49:45
问题 I'm working on file sharing on Google Drive in my android app. Here is the scenario... User A shares a file with User B, gives him/her the "writer" role. Later, forgetful User A, again, shares the same file with User B, giving him/her the "reader" role this time. My question is, will this override the first permission? or should the app handle checking of existing file permissions? 回答1: You can use drive.permissions.update to update role property of a permission , provided that you have

PHP upload not working, maybe permission issues

帅比萌擦擦* 提交于 2019-12-11 03:18:12
问题 I need to make an upload page in my site, I'm using an altervista trial server. I used the tutorial http://www.w3schools.com/php/php_file_upload.asp but the upload doesn't work. maybe, as I read is a permission issue, but I don't have the slightest idea on how to change the permissions of my folders. Is it possible to add also pdf in the uploadable files? thanks uploadpage.html <!doctype html> <html> <head> <meta charset="utf-8"> <title>Documento senza titolo</title> <link href="valsilehome

How to write files in C:\Windows\System32 with full permissions

邮差的信 提交于 2019-12-11 02:25:27
问题 Iam working on POS software using winforms. Iam trying to programmatically writing XML file (which contain some encrypted information about software serial number) to C:\Windows\System32 directory. But when i write i get an error Access denied. Can anyone please explain how can i write this file with full permissions in this directory in windows 7 as well as in windows XP??? Any other suggestion or better way to do this will also be welcome. Thanks in advance. 回答1: You'll need to be an

Self-Updating .NET client application which needs to write in the Program File folder

会有一股神秘感。 提交于 2019-12-11 00:35:19
问题 Similar to: Request Windows Vista UAC elevation if path is protected? I have a .NET Client Application installed in c:\Program Files (Windows Vista). This application should update itself, but it doesn't because of permission issues. The auto-updater should simply replace a couple of assemblies, but they are all located under c:\Program File and the application throws the following exception: System.UnauthorizedAccessException: Access to the path 'C:\Program Files...' is denied. I have no

No access permission for App_Data

妖精的绣舞 提交于 2019-12-10 23:38:42
问题 I am finishing my web project and have added a little error log feature. It writes details of exceptions in a dated file in the App_Data folder. When I do this on my development machine, it works. But when I switch over to my IIS machine, it stops working and I get a UnauthorizedAccessException. Stack Trace: [UnauthorizedAccessException: Der Zugriff auf den Pfad "c:\inetpub\wwwroot\App_Data\Error_Logs\" wurde verweigert.] System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

copy() function doesn't work

﹥>﹥吖頭↗ 提交于 2019-12-10 22:57:10
问题 I have task to copy my file from a folder to the current one. But when I perform this I get the following error: Warning: copy(C:/wamp/www/dfms/) [function.copy]: failed to open stream: Permission denied in C:\wamp\www\dfms\docShow.php on line 646 The code is given below if (copy('images/uploads/'.$doclisting['docfile_name'], 'C:/wamp/www/dfms/')) { echo "Pranav"; } I also tried by using chmod 0777 but still it gives me same error 回答1: Have you tried adding the filename to the destination?

PHP files does not execute in windows machine

时光总嘲笑我的痴心妄想 提交于 2019-12-10 19:26:57
问题 i created the application in PHP on my mac osx. and after the development i zipped and transferred to the windows 7 machine. and when i tried opening it i get this error. Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0 Fatal error: Unknown: Failed opening required 'C:/wamp/www/app/index.php' (include_path='.;C:\php\pear') in Unknown on line 0 the above error suggest, the error is caused because of the file permission issue, is there any possible way i can fix