file-permissions

MongoDB - Permission denied for socket: /tmp/mongodb-27017.sock

﹥>﹥吖頭↗ 提交于 2019-11-26 16:42:30
问题 I had an unclean shutdown of MongoDB on Ubuntu 10.04 LTS. Now when I login as root and run Mongodb via service mongodb start, I get below error- Mon Dec 12 13:53:15 [initandlisten] ERROR: listen(): bind() failed errno:13 Permission denied for socket: /tmp/mongodb-27017.sock When I run MongoDB manually via root, it works just fine. I can confirm that there is no /tmp/mongodb-27017.sock file root@devbox:~# ll /tmp/ total 16 drwxr-xr-x 4 root root 4096 2011-12-12 13:53 ./ drwxr-xr-x 25 root root

How can I let users access the internal storage directory of my app?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-26 16:36:14
问题 My app stores files in its internal storage directory (/Android/data/com.mycompany.myapp/files, as returned by getFilesDir()), and I would like to allow users to access those files directly from a file management app on their mobile device or the Android File Transfer desktop appplication. The Storage Options developer guide says: By default, files saved to the internal storage are private to your application and other applications cannot access them (nor can the user). "By default" implies

How do I give PHP write access to a directory?

落爺英雄遲暮 提交于 2019-11-26 16:01:37
I'm trying to use PHP to create a file, but it isn't working. I am assuming this is because it doesn't have write access (it's always been the problem before). I tried to test if this was the problem by making the folder chmod 0777, but that just ended up making every script in that directory return a 500 error message until I changed it back. How do I give PHP write access to my file system so it can a create a file? Edit: It is hosted on Hostgator shared hosting using Apache. Edit 2: Someone asked for the code: The code is a GD image script. I know the rest of it works as previously I was

How to grant permission to users for a directory using command line in Windows?

自古美人都是妖i 提交于 2019-11-26 14:48:20
How can I grant permissions to a user on a directory (Read, Write, Modify) using the Windows command line? Călin Darie As of Vista, cacls is deprecated. Here's the first couple of help lines: C:\>cacls NOTE: Cacls is now deprecated, please use Icacls. Displays or modifies access control lists (ACLs) of files You should use icacls instead. This is how you grant John full control over D:\test folder and all its subfolders: C:\>icacls "D:\test" /grant John:(OI)(CI)F /T According do MS documentation: F = Full Control CI = Container Inherit - This flag indicates that subordinate containers will

Storing file permissions in Subversion repository

怎甘沉沦 提交于 2019-11-26 14:33:35
问题 How do you store file permissions in a repository? A few files need to be read-only to stop a third party program from trashing it but after checking out of the repository they are set to read-write. I looked on google and found a blog post from 2005 that states that Subversion doesn't store file-permissions. There are patches and hook-scripts listed (only one url still exists). Three years later does Subversion still not store file permissions and are hooks the only way to go about this? (I

Windows 7, update.packages problem: “unable to move temporary installation”?

青春壹個敷衍的年華 提交于 2019-11-26 12:41:55
I am using R 2.13.0 with windows 7, after giving my user full privileges to the R folder (as described here ). This allows me to install new packages just fine. However, when using update.packages(), to update existing packages, I keep getting the following error (for example, when updating the MASS package): package 'MASS' successfully unpacked and MD5 sums checked Warning: unable to move temporary installation 'C:\Program Files\R\R-2.13.0\library\file6cae3bcf\MASS' to 'C:\Program Files\R\R-2.13.0\library\MASS' Any suggestions on how to fix this? p.s: Running R as an administrator or shifting

Can I simply 'read' a file that is in use?

为君一笑 提交于 2019-11-26 12:28:57
问题 I am trying to use a StreamReader to read a file, but it is always in use by another process so I get this error: The process cannot access the file \'\\arfjwknasgmed17\\C$\\FLAG CONDITION\\CP-ARFJN-FLAG.XLS\' because it is being used by another process. Is there a way I can read this without copying it? Or is that my only option? 回答1: You can read the file only if the program that opened the file first specified read sharing rights on that file. If the file does indeed have no read sharing

How can I get the Unix permission mask from a file?

ⅰ亾dé卋堺 提交于 2019-11-26 12:06:27
问题 How can I get a file\'s permission mask like 644 or 755 on *nix using python? Is there any function or class for doing that? Thank you very much! 回答1: os.stat is a wrapper around the stat(2) system call interface. >>> import os >>> from stat import * >>> os.stat("test.txt") # returns 10-tupel, you really want the 0th element ... posix.stat_result(st_mode=33188, st_ino=57197013, \ st_dev=234881026L, st_nlink=1, st_uid=501, st_gid=20, st_size=0, \ st_atime=1300354697, st_mtime=1300354697, st

How to read the mode field of git-ls-tree's output

给你一囗甜甜゛ 提交于 2019-11-26 11:33:19
$ git ls-tree fb3a8bdd0ce 100644 blob 63c918c667fa005ff12ad89437f2fdc80926e21c .gitignore 100644 blob 5529b198e8d14decbe4ad99db3f7fb632de0439d .mailmap 100644 blob 6ff87c4664981e4397625791c8ea3bbb5f2279a3 COPYING 040000 tree 2fb783e477100ce076f6bf57e4a6f026013dc745 Documentation 100755 blob 3c0032cec592a765692234f1cba47dfdcc3a9200 GIT-VERSION-GEN 100644 blob 289b046a443c0647624607d471289b2c7dcd470b INSTALL 100644 blob 4eb463797adc693dc168b926b6932ff53f17d0b1 Makefile 100644 blob 548142c327a6790ff8821d67c2ee1eff7a656b52 README ... I know the last 3 oct digits are file mode, but what are the

Cannot read configuration file due to insufficient permissions

好久不见. 提交于 2019-11-26 11:29:59
I've recently encountered an error trying to host my asp.net site with IIS. I have found a solution that many swear by. Solution: Add IIS_IUSRS with Read permission on files in the folder Change IIS authentication method to BasicAuthentication refresh the website. It will work ( http://vivekthangaswamy.blogspot.com/2009/07/aspnet-website-cannot-read.html ) What do I add to my web.config file though? I've never had to edit it before. Here is its current contents: <?xml version="1.0"?> <!-- For more information on how to configure your ASP.NET application, please visit http://go.microsoft.com