permissions

sorl thumbnail + django issues in production

那年仲夏 提交于 2020-01-14 15:09:50
问题 I'm using sorl thumbnail with Django. On my local setup it works fine, but in production the thumbnails are not made. My code looks like this: {% load thumbnail %} {% thumbnail up.image "32x32" crop="center" as im %} <img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}"> {% empty %} <img src="{{ MEDIA_URL }}/images/missing_small.png" alt="" title="" /> {% endthumbnail %} I enabled logging and the trace looks like this: Traceback (most recent call last): [...] File "/usr

sorl thumbnail + django issues in production

◇◆丶佛笑我妖孽 提交于 2020-01-14 15:05:27
问题 I'm using sorl thumbnail with Django. On my local setup it works fine, but in production the thumbnails are not made. My code looks like this: {% load thumbnail %} {% thumbnail up.image "32x32" crop="center" as im %} <img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}"> {% empty %} <img src="{{ MEDIA_URL }}/images/missing_small.png" alt="" title="" /> {% endthumbnail %} I enabled logging and the trace looks like this: Traceback (most recent call last): [...] File "/usr

Android java.lang.IllegalStateException in onRequestPermissionsResult()

好久不见. 提交于 2020-01-14 13:50:55
问题 I am working with sd card and so trying to get permission in runtime. Here is the code: public class MainActivity extends AppCompatActivity implements FileListFragment.OnFragmentInteractionListener { private static final int MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE = 111; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL

Update role user: not authorized on admin to execute command

天大地大妈咪最大 提交于 2020-01-14 12:44:26
问题 When I try to get info about replica I get the following error: rep0:PRIMARY> rs.printReplicationInfo() 2015-05-19T13:30:29.231+0200 error: { "$err" : "not authorized for query on local.system.namespaces", "code" : 13 } at src/mongo/shell/query.js:131 I have tried to execute the command with the two following users: [ { "_id" : "admin.siteRootAdmin", "user" : "siteRootAdmin", "db" : "admin", "roles" : [ { "role" : "root", "db" : "admin" } ] }, { "_id" : "admin.mongoadmin", "user" :

Update role user: not authorized on admin to execute command

断了今生、忘了曾经 提交于 2020-01-14 12:42:49
问题 When I try to get info about replica I get the following error: rep0:PRIMARY> rs.printReplicationInfo() 2015-05-19T13:30:29.231+0200 error: { "$err" : "not authorized for query on local.system.namespaces", "code" : 13 } at src/mongo/shell/query.js:131 I have tried to execute the command with the two following users: [ { "_id" : "admin.siteRootAdmin", "user" : "siteRootAdmin", "db" : "admin", "roles" : [ { "role" : "root", "db" : "admin" } ] }, { "_id" : "admin.mongoadmin", "user" :

Monitoring AppFabric Cache

浪尽此生 提交于 2020-01-14 10:39:29
问题 I have a HighlyAvailable AppFabric cache setup across 3 servers (AppFabric 1.1). I want to monitor the local cache on each server and, if it is down for any reason start it back up. Problem The problem is permissions - I wrote a Powershell script to do this, and it works great if I run while logged in or set up a Scheduled Task to run it as me - but I am an administrator on all machines. If I try running this script with a service user, it fails. I don't want to make my service user an

VB.NET app is setting restricted file permissions on a directory, which is incorrectly restricting user created files in the same directory

空扰寡人 提交于 2020-01-14 02:51:09
问题 My VB.NET application builds a tree of directories with restricted access. The access should be that a normal user can not delete or rename the existing tree. But the user can add new files/folders anywhere in the tree. A user created file/folder should be fully modifiable by any user. The problem I'm having is getting access set so that files/folders created by the app can't be changed, but files/folders created by users can be changed by any user. What is currently happening, is the files

error: git checkout-index: unable to create file (Permission denied)

送分小仙女□ 提交于 2020-01-13 19:12:27
问题 When I try and pull from github I get a strange error. Can I bypass this or force it? I have used sudo before which I suspect would work however this caused other problems. 回答1: I had this problem as well. I solved it by changing the ownership of the directories to the user I was trying to git pull with: sudo chown -R anthony:anthony * I ran that at the root of my git tracked directory to make sure all the files were owned by the correct user. 回答2: In my case it was having sublime text open

error: git checkout-index: unable to create file (Permission denied)

混江龙づ霸主 提交于 2020-01-13 19:09:00
问题 When I try and pull from github I get a strange error. Can I bypass this or force it? I have used sudo before which I suspect would work however this caused other problems. 回答1: I had this problem as well. I solved it by changing the ownership of the directories to the user I was trying to git pull with: sudo chown -R anthony:anthony * I ran that at the root of my git tracked directory to make sure all the files were owned by the correct user. 回答2: In my case it was having sublime text open

On checking for permissions dynamically in android apps

假如想象 提交于 2020-01-13 18:58:37
问题 Following up on my previous question on android permissions enforcement at runtime, I found that there are many different ways in android which an app can verify the permissions possessed by the calling (client) app. This includes calls like checkCallingPermission, checkCallingOrSelfPermission, checkCallingUriPermission, checkCallingOrSelfUriPermission, checkPermission, checkUriPermission. As far as I have gone through the android documentation, I am able to find only these calls pertaining