permissions

Why does nose finds tests in files with only 644 permission?

女生的网名这么多〃 提交于 2019-12-10 03:51:04
问题 Today I ran a bunch of doctests using Python 2.6 on a Ubuntu 9.10 with nose : nosetests --with-doctest Ran 0 tests in 0.001s OK WTF? I had tests in that files, why didn't that work? I changed permission to 644: sudo chmod 644 * -R nosetests --with-doctest Ran 11 test in 0.004s FAILED (errors=1) Changing it back to 777: sudo chmod 777 * -R nosetests --with-doctest Ran 0 tests in 0.001s OK Why is that? Using 644, I can't even edit my files! 回答1: Try the --exe flag: $ nosetests --help ... --exe

Permission denied when opening localhost

我与影子孤独终老i 提交于 2019-12-10 03:21:23
问题 I had recently installed Apache, PHP and MySQL in Ubuntu. And copied the files I created to the var/www directory. But when I open http://localhost it is showing Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0 Fatal error: Unknown: Failed opening required '/var/www/index.php' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0 How can I run my project normally? It was working fine in windows. 回答1: According to this article, you need to give

CanCan gem for MVC .NET

那年仲夏 提交于 2019-12-10 03:05:22
问题 I am looking for NuGet package that provides similar functionality as the CanCan gem in rails ( https://github.com/ryanb/cancan ). Does anyone know a plugin that provides a similar functionality? Or a simple way to implement this? Thanks 回答1: I ended up looking at http://www.develop.com/wifclaimsbasedauthorizationone it does very much as CanCan does. For example ClaimsPrincipalPermission.CheckAccess("Customer","Add"); Would check whether the user had permission to add customers. We are

Java enum confusion with creating a bitmask and checking permissions

回眸只為那壹抹淺笑 提交于 2019-12-10 03:04:06
问题 I want to port this c# permission module to java, but I am confused how I can do this when I can't save the numeric value in the database and then cast it to the enumeration representation. In c#, I create a enum like this: public enum ArticlePermission { CanRead = 1, CanWrite = 2, CanDelete = 4, CanMove = 16 } I then can create a permission set like: ArticlePermission johnsArticlePermission = ArticlePermission.CanRead | ArticlePermission.CanMove; I then save this into the database using:

Firebase + Permissions

风流意气都作罢 提交于 2019-12-10 01:48:14
问题 I just updated one app from Firebase 9.0.0 to Firebase 9.0.2. I use messaging + ads. compile 'com.google.firebase:firebase-messaging:9.0.2' compile "com.google.firebase:firebase-ads:9.0.2" Now a lot of unwanted permission have cropped up android:name="android.permission.READ_PHONE_STATE" android:name="android.permission.READ_EXTERNAL_STORAGE" android:name="android.permission.WRITE_EXTERNAL_STORAGE" I didn't add those permissions anywhere, so they must be from Firebase. I know my clients don't

Amazon ssh_exchange_identification: read: Connection reset by peer: when changing permissions

余生颓废 提交于 2019-12-10 01:13:59
问题 I went on to my amazon ec2 successfully and I have been experimenting around. I found it annoying that I needed to always run sudo on everything so what I decided to do was to go to the route directory and change the permissions of everything to write, write, and execute. I did so doing the following chmod -R 777 . I then exited out of the server. The next time I tried to logon I got "ssh_exchange_identification: read: Connection reset by peer" How can I fix this? Thank you 回答1: My solution

where policy file location for my applet that needs clients permission to access resource?

╄→гoц情女王★ 提交于 2019-12-09 18:23:51
问题 i find out that i must write a policy file to grant permission for my applet... but i really confused with it... :( i want to write a applet that is a map viewer, i need to save image tiles on client that run my applet to locally access tiles for gain speed and time safely viewing map which is benefit to user... so, the applet needs grant permission to read/write and make directory on client tempdir. now, i want to write a policy file to gain permission to my applet,i don't want to involve

C# .NET - how to determine if directory is writable, with or without UAC?

偶尔善良 提交于 2019-12-09 17:53:45
问题 I'm working on a piece of software that needs to copy a file to a given directory on the filesystem. It needs to work on both UAC-aware OSs (Vista, 7) as well as XP. To get around the issue of writing to a directory where UAC elevation is required, the app actually kicks off another process with a manifest that states that UAC is required. This generates the prompt and then does the copy when the user confirms. From what I can see, a directory can have three different logical permission

Detect when “back to app” is pressed

 ̄綄美尐妖づ 提交于 2019-12-09 17:28:07
问题 I've created a function which is suppose to handle the permission with location, so that the app will close if it does not have permission to location. However when you press open settings and press "back to app" in the status bar the determeinePermission method is not being executed again. I've tried to add it to viewDidLoad , viewDidAppear and viewWillAppear . what can I do? func determinePermission() { switch CLLocationManager.authorizationStatus() { case .Authorized: if CLLocationManager

User with grant option can't grant create user

穿精又带淫゛_ 提交于 2019-12-09 15:57:20
问题 I created a user (new_user) with root like this: GRANT ALL ON labor.* TO 'new_user'@'%' WITH GRANT OPTION; GRANT ALL ON labor.* TO 'new_user'@'localhost' WITH GRANT OPTION; GRANT CREATE USER ON *.* TO 'new_user'@'%'; GRANT CREATE USER ON *.* TO 'new_user'@'localhost'; GRANT RELOAD ON *.* TO 'new_user'@'localhost'; GRANT RELOAD ON *.* TO 'new_user'@'%'; FLUSH PRIVILEGES; When I try to create another user the same way but with new_user, I get an access denied error. This error occurs after the