directory-permissions

.NET Core - directory permissions Linux

孤街浪徒 提交于 2020-03-03 04:27:41
问题 In my Unit Test project for .NET Core I'm trying to create a folder and then limit access permissions. So far I implemented Windows version of this code: DirectoryInfo dirInfo = Directory.CreateDirectory(DriveManager.LogicalDrive + ":\\testDir"); DirectorySecurity dirSecurity = new DirectorySecurity(dirInfo.FullName, AccessControlSections.All); var securityId = System.Security.Principal.WindowsIdentity.GetCurrent().User; FileSystemAccessRule rule = new FileSystemAccessRule(securityId,

Access To The Path … Is Denied

左心房为你撑大大i 提交于 2019-12-31 01:45:45
问题 Alright, I've seen tons of questions about this thing, but still, no one answers my question. In fact, each one of the questions I saw differs from the other, this access thing really seems to be hassling programmers. Please check out the code: DirectoryInfo Dir1 = Directory.CreateDirectory(Desktop + "\\DIR1"); DirectoryInfo Dir2 = Directory.CreateDirectory(Desktop + "\\DIR2"); //* Lets Create a couple of SubDirs in DIR1 for (int i = 0; i < 5; i++) { // this will create 5 SubDirs in DIR1,

C# WMI runs an exe on a remote PC that then runs another exe on the same PC that then calls Directory.CreateDirectory on a network path and fails

社会主义新天地 提交于 2019-12-23 09:08:50
问题 Using C# WMI I start an exe on another computer and this exe starts another exe using the C# Process class. The last exe tries to call Directory.CreateDirectory using a network path (aka \\\\comp1\d$\dir\ ). Directory.CreateDirectory throws this exception: Access to the path '\\\\blah\blah\blah' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, DirectorySecurity dirSecurity) at System

Can't delete user directory on CentOS

亡梦爱人 提交于 2019-12-13 22:02:03
问题 I'm stuck. I did a simple useradd. I had user -> mark and assigned directory -> /home/mark. Here i've installed a software. Later I've deleted mark and now i can't delete /home/mark. With root account I tried to: a) Change permission to 777 -> Permission denied b) Delete directory with rm -rf /home/mark Permission denied c) Nautilus sudo nautilus Could not parse arguments: Can't open display (what??) There's no way for me to remove this directory from my server. Here's my permissions list ls

Test-Path / System.IO.Directory::Exists not working as expected

假装没事ソ 提交于 2019-12-12 16:33:09
问题 I'm having trouble using the Powershell CmdLet Test-Path. I created a Share on a Server (\\Servername\MyShare$), which allows one Group of users to just create a file and append data, while others users can just read and delete these files. The first group is not allowed to do anything else, including Read-Permissions, Read-Attributes and so on. If I do a Test-Path on this folder as member of the "drop files only" group, it returns false. Even [System.IO.Directory]::Exists() returns false. I

CreateDirectory at server in a shared machine

。_饼干妹妹 提交于 2019-12-12 01:59:56
问题 I have an ASP.NET application running over a shared .NET server. I want to allow the current logged user to create a folder into a specific path when the application needs it. So, I'm just checking the following: var userFolderPath = Path.Combine(Server.MapPath("~/storedphotos"), username); if (!Directory.Exists(userFolderPath)) { Directory.Create(userFolderPath); } When I run this code into my local machine it works perfectly. However, when I publish the application to that server and try to

Sitecore folder & IIS permissions

耗尽温柔 提交于 2019-12-11 01:54:48
问题 When setting up or moving a Sitecore solution, you have to remember to setup the correct folder permissions and IIS permissions. It something like sections 3.3.3.2 - 3.3.3.9 here: http://sdn.sitecore.net/Products/Sitecore%20V5/Sitecore%20CMS%205,-d-,3/Installation/EXE%20Installation.aspx The folder permissions are usually setup when using the installer, but not when using the Zip or just moving an existing solution. You could use the guides (for Sitecore 6) here: http://sdn.sitecore.net

SVN - User directory permissions

半世苍凉 提交于 2019-12-09 13:40:12
问题 I'm using SVN (CollabNet Subversion Edge) and Tortoise SVN to manage a website being edited by multiple people. I'd like to limit access by some users to some directories (to prevent them seeing database credentials etc). They only require read access to one directory. Is it possible to do this in SVN? Thanks! Edit They are running a mix of XP and Windows 7. The server is on Windows 2008. The protocol being used is http. 回答1: This can be achieved by using the svnaccess.conf file. Assuming you

Access To The Path … Is Denied

隐身守侯 提交于 2019-12-01 21:26:33
Alright, I've seen tons of questions about this thing, but still, no one answers my question. In fact, each one of the questions I saw differs from the other, this access thing really seems to be hassling programmers. Please check out the code: DirectoryInfo Dir1 = Directory.CreateDirectory(Desktop + "\\DIR1"); DirectoryInfo Dir2 = Directory.CreateDirectory(Desktop + "\\DIR2"); //* Lets Create a couple of SubDirs in DIR1 for (int i = 0; i < 5; i++) { // this will create 5 SubDirs in DIR1, named Sub1, Sub2 ... Sub5. Dir1.CreateSubdirectory("Sub" + (i + 1).ToString()); //* lets create 5 text

PHP File_put_contents not working

℡╲_俬逩灬. 提交于 2019-11-30 10:01:27
问题 Check this code: <?php $url = 'http://www.example.com/downloads/count.txt'; $hit_count = @file_get_contents($url); $hit_count++; @file_put_contents($url, $hit_count); header('Location: wmwc.zip'); ?> @file_get_contents is working fine and the header location change to the downloaded file also works, but either the hit_count increase or @file_put_contents isn't working, because the number with the file doesnt increase by 1. I've set the file permission to 777, but when I try to set the