无法运行xcacls来修改某个文件的用户权限? [英] Cannot run xcacls to modify user rights on a certain file?

查看:52
本文介绍了无法运行xcacls来修改某个文件的用户权限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨:


我在win 2003和ASP.NET工作。我尝试通过运行xcacls来修改用户权限从

ASPX(在C#中编写)页面。但失败了。我做了什么

是:


处理myProcess = new Process();


myProcess.StartInfo.FileName =" cmd.exe";


myProcess.StartInfo.Arguments = @" / C xcacls filename / T / E / G用户名:R; R

/ Y";


myProcess.StartInfo.UseShellExecute = false;


myProcess.StartInfo.RedirectStandardOutput = true;


myProcess.StartInfo.CreateNoWindow = true;


myProcess.Start();

然而,如果只尝试获取ACL信息:

myProcess.StartInfo.Arguments = @" / C xcacls filename / Y" ;;


我认为它可能是由安全性引起的设置我的系统以便它确实

不允许更改安全权。


有谁知道问题在哪里?


谢谢


Q.

Hi:

I am working in win 2003 and ASP.NET. I tried to modify the user rights from
an ASPX (writen in C#) page through running xcacls. But failed. What I did
is:

Process myProcess = new Process();

myProcess.StartInfo.FileName = "cmd.exe";

myProcess.StartInfo.Arguments = @"/C xcacls filename /T /E /G username:R;R
/Y";

myProcess.StartInfo.UseShellExecute=false;

myProcess.StartInfo.RedirectStandardOutput = true;

myProcess.StartInfo.CreateNoWindow = true ;

myProcess.Start();
However, it worked if only try to get the ACLs information:
myProcess.StartInfo.Arguments = @"/C xcacls filename /Y";

I think it might be caused by security setting of my system so that it did
not allow to change the security right.

Does anyone know where the problem is?

Thanks

Q.

推荐答案

在什么用户帐户下上下文是你的AS PX页面在运行?

经常账户可能没有足够的权利。


杰夫


" Quentin Huo" <:Q *** @ manyworlds.com>在消息中写道

news:uz ************** @ TK2MSFTNGP14.phx.gbl ...
Under what user account context is your ASPX page running under? The
current account probably doesn''t have sufficient rights.

Jeff

"Quentin Huo" <q.***@manyworlds.com> wrote in message
news:uz**************@TK2MSFTNGP14.phx.gbl...
嗨:

我在win 2003和ASP.NET工作。我试图通过运行xcacls从ASPX(在C#中编写)页面修改用户权限
。但失败了。我做了
是:

处理myProcess = new Process();

myProcess.StartInfo.FileName =" cmd.exe";

myProcess.StartInfo.Arguments = @" / C xcacls filename / T / E / G用户名:R; R
/ Y" ;;

myProcess.StartInfo.UseShellExecute = false;

myProcess.StartInfo.RedirectStandardOutput = true;

myProcess.StartInfo.CreateNoWindow = true;

myProcess.Start();

但是,只有尝试获取ACL信息才有效:
myProcess.StartInfo.Arguments = @" / C xcacls filename / Y" ;;

我认为它可能是由我系统的安全设置引起的,所以它确实不允许改变安全权。

有谁知道问题在哪里?

谢谢

Q.
Hi:

I am working in win 2003 and ASP.NET. I tried to modify the user rights from an ASPX (writen in C#) page through running xcacls. But failed. What I did
is:

Process myProcess = new Process();

myProcess.StartInfo.FileName = "cmd.exe";

myProcess.StartInfo.Arguments = @"/C xcacls filename /T /E /G username:R;R
/Y";

myProcess.StartInfo.UseShellExecute=false;

myProcess.StartInfo.RedirectStandardOutput = true;

myProcess.StartInfo.CreateNoWindow = true ;

myProcess.Start();
However, it worked if only try to get the ACLs information:
myProcess.StartInfo.Arguments = @"/C xcacls filename /Y";

I think it might be caused by security setting of my system so that it did
not allow to change the security right.

Does anyone know where the problem is?

Thanks

Q.



NETWORK SERVICE是否拥有该文件的所有权?或者它是否有更改权限和更改权限。许可?


您必须将这些权限授予NETWORK SERVICE帐户,

或在具有这些权限的帐户下运行工作进程(或

使用模拟和Pinvoke Win32 API函数进行更改 -

但这在1.1中并不容易。实际上有很多

的替代方案可以让你的工作取决于你需要做什么。


-

Scott
http://www.OdeToCode.com/blogs/scott/

2004年11月18日星期四10:30:52 - 0600,Quentin Huo

< q。*** @ manyworlds.com> ;写道:
Does the NETWORK SERVICE have ownership of the file? Or does it have
the "Change permissions" permission?

You''ll have to give these permissions to the NETWORK SERVICE account,
or run the worker process under an account with these permissions (or
use impersonation and Pinvoke Win32 API functions to make the change -
but that''s not easy in 1.1). There are actually quite a number of
alternatives to get this working depending on what you need to do.

--
Scott
http://www.OdeToCode.com/blogs/scott/
On Thu, 18 Nov 2004 10:30:52 -0600, "Quentin Huo"
<q.***@manyworlds.com> wrote:
嗨:

我在win 2003和ASP.NET工作。我试图通过运行xcacls从
ASPX(在C#中编写)页面修改用户权限。但失败了。我做了
是:

处理myProcess = new Process();

myProcess.StartInfo.FileName =" cmd.exe";

myProcess.StartInfo.Arguments = @" / C xcacls filename / T / E / G用户名:R; R
/ Y" ;;

myProcess.StartInfo.UseShellExecute = false;

myProcess.StartInfo.RedirectStandardOutput = true;

myProcess.StartInfo.CreateNoWindow = true;

myProcess.Start();

但是,只有尝试获取ACL信息才有效:
myProcess.StartInfo.Arguments = @" / C xcacls filename / Y" ;;

我认为它可能是由我系统的安全设置引起的,所以它确实不允许改变安全权。

有谁知道问题在哪里?

谢谢

Q.
Hi:

I am working in win 2003 and ASP.NET. I tried to modify the user rights from
an ASPX (writen in C#) page through running xcacls. But failed. What I did
is:

Process myProcess = new Process();

myProcess.StartInfo.FileName = "cmd.exe";

myProcess.StartInfo.Arguments = @"/C xcacls filename /T /E /G username:R;R
/Y";

myProcess.StartInfo.UseShellExecute=false;

myProcess.StartInfo.RedirectStandardOutput = true;

myProcess.StartInfo.CreateNoWindow = true ;

myProcess.Start();
However, it worked if only try to get the ACLs information:
myProcess.StartInfo.Arguments = @"/C xcacls filename /Y";

I think it might be caused by security setting of my system so that it did
not allow to change the security right.

Does anyone know where the problem is?

Thanks

Q.






登录的用户在管理员组中。

" Jeff Dillon" < JE ** @ removeemergencyreporting.com>在消息中写道

新闻:Od ************** @ TK2MSFTNGP09.phx.gbl ...
the user who login is in the group "administrators".
"Jeff Dillon" <je**@removeemergencyreporting.com> wrote in message
news:Od**************@TK2MSFTNGP09.phx.gbl...
在什么用户帐户下你的ASPX页面在运行吗?
经常账户可能没有足够的权利。

Jeff

Quentin Huo <:Q *** @ manyworlds.com>在消息中写道
新闻:uz ************** @ TK2MSFTNGP14.phx.gbl ...
Under what user account context is your ASPX page running under? The
current account probably doesn''t have sufficient rights.

Jeff

"Quentin Huo" <q.***@manyworlds.com> wrote in message
news:uz**************@TK2MSFTNGP14.phx.gbl...
嗨:

我在win 2003和ASP.NET工作。我尝试通过运行xcacls从
Hi:

I am working in win 2003 and ASP.NET. I tried to modify the user rights
ASPX(在C#中编写)页面修改用户权限


from


。但失败了。我做了什么


处理myProcess = new Process();

myProcess.StartInfo.FileName =" cmd.exe" ;;

myProcess.StartInfo.Arguments = @" / C xcacls filename / T / E / G
用户名:R; R
/ Y" ;;

myProcess.StartInfo.UseShellExecute = false;

myProcess.StartInfo.RedirectStandardOutput = true;

myProcess.StartInfo.CreateNoWindow = true;

myProcess.Start();

但是,只有尝试获取ACL信息才有效:
myProcess.StartInfo.Arguments = @" / C xcacls filename / Y" ;;

我认为这可能是由我系统的安全设置引起的,所以它确实不允许改变安全权。

有谁知道在哪里问题是什么?

感谢

Q.

an ASPX (writen in C#) page through running xcacls. But failed. What I
did
is:

Process myProcess = new Process();

myProcess.StartInfo.FileName = "cmd.exe";

myProcess.StartInfo.Arguments = @"/C xcacls filename /T /E /G
username:R;R
/Y";

myProcess.StartInfo.UseShellExecute=false;

myProcess.StartInfo.RedirectStandardOutput = true;

myProcess.StartInfo.CreateNoWindow = true ;

myProcess.Start();
However, it worked if only try to get the ACLs information:
myProcess.StartInfo.Arguments = @"/C xcacls filename /Y";

I think it might be caused by security setting of my system so that it
did
not allow to change the security right.

Does anyone know where the problem is?

Thanks

Q.



这篇关于无法运行xcacls来修改某个文件的用户权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆