파일 권한을 수정하고 666/777 등의 권한에 대해 말하고 있습니다. 즉, tio가 ANY에서 666으로 파일 사용 권한을 변경하는 방법입니다. 목표 ASP.NET MVC 웹 응용 프로그램에서 업로드 된 파일의 권한을 변경하고 있습니다.C# - 파일 사용 권한 수정 ASP.NET MVC
public string Uploadfile(HttpRequestBase currentRequest)
{
string fileName = "";
for (int i = 0; i < currentRequest.Files.Count; i++)
{
if (currentRequest.Files[i].ContentLength > 0)
{
string strFileName = Guid.NewGuid().ToString() +
Path.GetExtension(currentRequest.Files[i].FileName);
currentRequest.Files[i].SaveAs(HttpContext.Current.Server.MapPath("/Upload/Task/" + strFileName));
fileName = strFileName;
}
}
return fileName;
}
}
이 코드 읽기 및 쓰기 수 있지만 실행을 허용하지 않습니다
자세한 내용은 여기 MSDN에서 사용할 수 있습니까? – user2120121
FullControl에는 실행이 포함됩니다. FileSystemRights에 가능한 값에 대한 링크를 포함하도록 답변을 업데이트했습니다. –