permissions

Bower error tunneling socket could not be established, cause=Parse Error

放肆的年华 提交于 2019-12-18 22:32:41
问题 I'm behind a corporate proxy, I've set my HTTP_PROXY and HTTPS_PROXY env var to http://username:password@proxyname:port/ doing console.log(process.env) output these var correctly. npm is working, I got bower with it and it(bower) was working fine but since I restarted windows XP I'm always getting : bower error tunneling socket could not be established, cause=Parse Error I don't think there's anything new on the proxy side. I've already tried reseting those vars, restarting everything... Any

Can I set the umask for tempfile.NamedTemporaryFile in python?

早过忘川 提交于 2019-12-18 21:55:02
问题 In Python (tried this in 2.7 and below) it looks like a file created using tempfile.NamedTemporaryFile doesn't seem to obey the umask directive: import os, tempfile os.umask(022) f1 = open ("goodfile", "w") f2 = tempfile.NamedTemporaryFile(dir='.') f2.name Out[33]: '/Users/foo/tmp4zK9Fe' ls -l -rw------- 1 foo foo 0 May 10 13:29 /Users/foo/tmp4zK9Fe -rw-r--r-- 1 foo foo 0 May 10 13:28 /Users/foo/goodfile Any idea why NamedTemporaryFile won't pick up the umask? Is there any way to do this

Can I set the umask for tempfile.NamedTemporaryFile in python?

吃可爱长大的小学妹 提交于 2019-12-18 21:54:52
问题 In Python (tried this in 2.7 and below) it looks like a file created using tempfile.NamedTemporaryFile doesn't seem to obey the umask directive: import os, tempfile os.umask(022) f1 = open ("goodfile", "w") f2 = tempfile.NamedTemporaryFile(dir='.') f2.name Out[33]: '/Users/foo/tmp4zK9Fe' ls -l -rw------- 1 foo foo 0 May 10 13:29 /Users/foo/tmp4zK9Fe -rw-r--r-- 1 foo foo 0 May 10 13:28 /Users/foo/goodfile Any idea why NamedTemporaryFile won't pick up the umask? Is there any way to do this

Differences between CHMOD 755 vs 750 permissions set

帅比萌擦擦* 提交于 2019-12-18 18:48:35
问题 I have some files with 755 and i need to change them to 750, but i am not sure if this can affect some process. I am changin JARs, XMLs, LOGs and properitees files. Can someone explain to me the difference between these two permission set? Thanks! 回答1: 0755 = User: rwx Group: r-x World: r-x 0750 = User: rwx Group: r-x World: --- (i.e. World: no access) r = read w = write x = execute (traverse for directories) 来源: https://stackoverflow.com/questions/19547085/differences-between-chmod-755-vs

Why would shutil.copy() raise a permission exception when cp doesn't?

…衆ロ難τιáo~ 提交于 2019-12-18 18:36:49
问题 shutil.copy() is raising a permissions error: Traceback (most recent call last): File "copy-test.py", line 3, in <module> shutil.copy('src/images/ajax-loader-000000-e3e3e3.gif', 'bin/styles/blacktie/images') File "/usr/lib/python2.7/shutil.py", line 118, in copy copymode(src, dst) File "/usr/lib/python2.7/shutil.py", line 91, in copymode os.chmod(dst, mode) OSError: [Errno 1] Operation not permitted: 'bin/styles/blacktie/images/ajax-loader-000000-e3e3e3.gif' copy-test.py: import shutil shutil

access denied - PHP move_uploaded_file - Ubuntu LAMP /var/www

混江龙づ霸主 提交于 2019-12-18 17:14:55
问题 I realize there is some sort of problem with permissions on either my tmp folder or the images folder I created in the /var/www folder. I know that /var/www initially has root access. I have been following some online tutorials to try and fix this issue and have changed my permissions to who knows what over the last hour or so. I receive this error when trying to upload a file from an HTML form using PHP/MySQL: Warning: move_uploaded_file(images/verified-gw.gif): failed to open stream:

Patterns / design suggestions for permission handling

落花浮王杯 提交于 2019-12-18 15:51:30
问题 We have a rather complicated system of permission handling in our (ASP.NET web) application. Users can have specific permissions on different kinds of objects, some permissions are even packed into groups / roles that are assigned to users. All in all this ends up in a pretty complicated mess where for determining whether a user can do / see something you have to evaluate many different sources of permissions and this is done somehow on-demand and based on specific situations. My question is

Regarding Android Permissions and Signature Protection level

半城伤御伤魂 提交于 2019-12-18 15:41:31
问题 I am new to Android and have a question regarding protection level "Signature" for permissions in AndroidManifest.xml. The Android reference document states about "Signature" protection level: A permission that the system grants only if the requesting application is signed with the same certificate as the application that declared the permission. If the certificates match, the system automatically grants the permission without notifying the user or asking for the user's explicit approval.

Regarding Android Permissions and Signature Protection level

对着背影说爱祢 提交于 2019-12-18 15:41:11
问题 I am new to Android and have a question regarding protection level "Signature" for permissions in AndroidManifest.xml. The Android reference document states about "Signature" protection level: A permission that the system grants only if the requesting application is signed with the same certificate as the application that declared the permission. If the certificates match, the system automatically grants the permission without notifying the user or asking for the user's explicit approval.

PHP fopen() fails on files even with wide-open permissions

邮差的信 提交于 2019-12-18 15:35:14
问题 I'm currently migrating my LAMP from my Windows Server to a VPS running Debian 6. Most everything is working, however, one of the PHP scripts was failing to write to its configured log file. I could not determine why, so I wrote a new, simple, contrived PHP script to test the problem. <?php ini_set('display_errors', 1); error_reporting(E_ALL); echo exec('whoami'); $log = fopen('/var/log/apache2/writetest/writetest.log', 'a'); if ($log != NULL) { fflush($log); fclose($log); $log = NULL; } ?>