permissions

Why does file_put_contents have permission issues when run from the browser?

旧巷老猫 提交于 2019-12-24 10:47:37
问题 This question has been asked a couple of times up here, but I haven't found a solution yet. I have a Fedora 19 LAMP server and I just want to run the simple command: file_put_contents('test.txt', 'Hello there'); in order to confirm that my web server can use PHP to write data to files. I'm having trouble figuring out a proper permissions scheme. To start, just for development, Apache's document root is /var/www/html . This directory was originally owned by a user and group called www-data ,

PHP and Permissions

牧云@^-^@ 提交于 2019-12-24 10:47:20
问题 I recently moved my website to a new host and now am experiencing some broken code.. I have an uploading script that is now returning this: move_uploaded_file() failed to open stream: Permission denied in *.. I've set the upload directory to 777 which worked fine, but my script is needed to have top level permissions.. (As the script itself sets permission to directories, does lots of copying etc) Is there a way in apache I can set the PHP script to the owner of all the folders on my server?

Android request run time permission not working

大城市里の小女人 提交于 2019-12-24 10:37:09
问题 I was having some problem when trying to request run time permission on Android emulator. What I am trying to do is upon button clicked, request for read and write to external storage permission before moving on to my async task class. Here is my code: private static final int PERMISSION_REQUEST_CODE = 1; String readPermission = Manifest.permission.READ_EXTERNAL_STORAGE; String writePermission = Manifest.permission.WRITE_EXTERNAL_STORAGE; @Click(R.id.buttonVersionUpgrade) void

How to view a pdf using iframe from my website?

拥有回忆 提交于 2019-12-24 10:31:47
问题 I have pdf files on my website that I would like to show on a page , I tried : <iframe src="https://mywebsite.com/files/file.pdf" frameborder="0" width="600" height="550" style="margin:0px; padding:0px;"></iframe> but the file is downloaded. I tried using google drive : <iframe src="https://drive.google.com/viewerng/viewer?embedded=true&url=http://mywebsite.com/files/file.pdf" ></iframe> But I get the html of my login page , I think it automatically redirects to login page. and I tried to use

Unable to write AppSettings of web.config on production server

心不动则不痛 提交于 2019-12-24 10:17:01
问题 I've written following code to make changes to the values of AppSettings in the web.config and when I tested it on my dev machine, it works fine. However, after I've copied the page to the production server, changing the values are not updated. Configuration myConfig = WebConfigurationManager.OpenWebConfiguration("~"); try { myConfig.AppSettings.Settings["username"].Value = txtUsername.Text; myConfig.AppSettings.Settings["password"].Value = txtPassword.Text; myConfig.AppSettings.Settings[

how to get access token without any login?

前提是你 提交于 2019-12-24 10:07:39
问题 In my iPhone app I want to read news feed from public Facebook page but I don't want in the beginning that the user has log in facebook to see wall of page. I try to pass access_token (in url to graph api) but this access token expire. Thank you in advance Javier 回答1: You may use your application access token for this which may be one of: YOUR_APP_ID|YOUR_APP_SECRET Application Access Token received from https://graph.facebook.com/oauth/access_token? client_id=YOUR_APP_ID&client_secret=YOUR

web2py, Database relationships and permissions

被刻印的时光 ゝ 提交于 2019-12-24 10:02:55
问题 So i've this problem i've 2 tables for example templates(id,user_id,template_name,reference) user_settings(id,user_id,default_template) so each user can create many templates and in his settings he can choose a default template that he will always use so now there is many users so when a user want to choose a default template, he can see all templates (his own templates and the templates for the other users) tables are so defined: db.define_table('i2l_templates', Field('id','id', represent

Oracle grant permission for execute

亡梦爱人 提交于 2019-12-24 09:57:56
问题 I've a dynamic sql inside a procedure which creates a view. If I print the string and execute it manually, I'm able to create the view. However in the procedure an exception is thrown as insufficient privileges. I've granted execute,create,all on the procedure to the user, however it still does not work. Any suggestions? 回答1: Inside packages, privileges granted indirectly (via a role) are dropped. You must grant the necessary privileges on the underlying objects to the account directly;

Folder permissions for PHP file uploads - private/public/shared views?

大兔子大兔子 提交于 2019-12-24 09:48:53
问题 I'm writing a php file upload script for a project - I have seen all the great opensource ones out there, but I've decided to do my own as I have a level of user access rights that I can't seem to find anywhere. So this is what I'm trying to do: Normal file uploads area, exactly like elFinder Some way to restrict certain users to view the folders and/or files, depending on what group they belong to. I need to do this as this is for an organisation I work in where certain users can only see

Allowing UserProfileManager Permissions in SharePoint 2010

谁说胖子不能爱 提交于 2019-12-24 09:16:30
问题 I am trying to display a list of users in a custom webpart using the UserProfileManager. For some reason, I can view the webpart and all profiles are output to the screen (maybe because I am an administrator). But when a standard user logs in, they encounter a 403 page. I have done some reading up on this and I know its something to do with permissions. This is what I have in my code: private DataTable GetProfiles() { DataTable dtUserProfile = new DataTable(); //...DataTable Columns