Ⅰ 如何給文件夾添加everyone用戶
everyone用戶是指任何用戶,如果給這個用戶的許可權是完全控制,那麼連接你你計算機的的所有用戶都能對此文件夾操作。一般情況下這個用戶給只讀許可權。
方法:
1.打開我的電腦--工具--文件夾選項--查看。把使用簡單文件共享的鉤去掉。然後右擊你的文件夾,共享,就有許可權設置了.
2.前提是硬碟使用NTFS格式。右鍵文件夾選擇安全,把everyone添加進去就好了。
3.或者編輯以下代碼實現: public void AddEvy()
{
Hashtable ht = new Hashtable();
ht.Add("Web.config", "F");
ht.Add("map", "D");
ht.Add("pic", "D");
ht.Add("rth/App_Data/SysConfig.xml", "F");
ht.Add("rth/config/Menus.xml", "F");
ht.Add("rth/zwwh/Web.config", "F");
ht.Add("log", "D");
foreach (DictionaryEntry de in ht)
{
string s = System.Windows.Forms.Application.StartupPath+"\\"+de.Key.ToString();
if (de.Value.ToString() == "F")
{
if (!File.Exists(s))
{
File.Create(s);
}
}
else
{
if (!Directory.Exists(s))
{
Directory.CreateDirectory(s);
}
}
if (de.Value.ToString() == "F")
{
AddDirectorySecurity("F", s, "Everyone", FileSystemRights.FullControl, AccessControlType.Allow);
}
else if (de.Value.ToString() == "D")
{
AddDirectorySecurity("D", s, "Everyone", FileSystemRights.FullControl, AccessControlType.Allow);
}
}
}
/// <summary>
/// 設置文件訪問許可權
/// </summary>
/// <param name="FileName"></param>
/// <param name="Account"></param>
/// <param name="Rights"></param>
/// <param name="ControlType"></param>
protected void AddDirectorySecurity(string t, string FileName, string Account, FileSystemRights Rights, AccessControlType ControlType)
{
if (t == "F")
{
FileInfo fi = new FileInfo(FileName);
FileSecurity dSecurity = fi.GetAccessControl();
dSecurity.AddAccessRule(new FileSystemAccessRule(Account, Rights, ControlType));
fi.SetAccessControl(dSecurity);
}
else
{
DirectoryInfo dInfo = new DirectoryInfo(FileName);
DirectorySecurity dSecurity = dInfo.GetAccessControl();
dSecurity.AddAccessRule(new FileSystemAccessRule(Account, Rights, ControlType));
dInfo.SetAccessControl(dSecurity);
}
}
Ⅱ 給文件夾附加everyone完全控制許可權
右鍵單擊文件夾→
屬性
→
安全
→
所有者→
勾選「替換子容器及對象的所有者」
返回到「安全」選項卡下,添加或找到everyone帳戶,勾選「完全控制」。
Ⅲ Windows7如何設置Everyone許可權
有的朋友不知道Windows7如何設置Everyone許可權,下面我就來告訴你們具體的方法吧!
1.這里咱們以F盤為例,首先,咱們雙擊打開Win7旗艦版的計算機,進入到資源管理器窗口之後,咱們右鍵點擊F盤,然後選擇屬性。
2.在打開的窗口中,咱們將界面切換到安全這一欄中,然後點擊下面的編輯按鈕,之後會彈出許可權窗口,咱們直接點擊添加按鈕。
3.在彈出來的選擇用戶或組窗口中,咱們點擊下方的高級按鈕,之後點擊彈出窗口右側的「立即查找」,這個時候底部會出現查找的選項,找到並選中「everyone」後點擊「確定」按鈕。
4.
在新打開的「選擇用戶或組」的界面中,咱們輸入對象名稱來選擇處,就可看到everyone許可權了,直接單擊「確定」。
5.最後一步咱們需要做的,就是返回到F盤的許可權窗口中,在組或用戶名中選擇「everyone」,並在「完全控制」前面打勾,設置完之後單擊確定保存設置即可。
這樣就簡單的設置好了,就可以做或者看更多你想要知道的事情了。
Ⅳ 怎麼把文件夾的許可權更改為EVERYONE的完全控制
工具/材料:電腦。
第一步,打開電腦進入桌面,找到文件打開。
Ⅳ 高分懸賞:在win2003里,如何設置一個文件夾的許可權為everyone
先在控制面板里找到管理文件夾,再許可權面板里,添加everyone的許可權.然後就在那裡把許可權的要求設置好.
再點擊想設置許可權的文件夾,右鍵-屬性-安全,點添加everyone . 就可以勒!
Ⅵ 在xp下,如何給文件夾賦everyone許可權
解決辦法:用超級管理員許可權登錄系統後給普通用戶賦權即可。
第一步:在要設置的文件夾上右擊,選擇」屬性「,找到」安全「