[DOS] Merubah permission suatu file atau folder pada Windows

by in , 0

Perintah :
TAKEOWN [/S system [/U username [/P [pass
/F filename [/A] [/R [/D prompt]] 


/s system Specifies the remote system to connect to.
/u [domain\]user Specifies the user context under which the command should execute.
/p [password] Specifies the password for the given user context. Prompts for input if omitted.
/f filename Specifies the filename or directory name pattern. Wildcard "*" can be used to specify the pattern. Allows sharename\filename.
/a   Gives ownership to the administrators group instead of the current user.
/r   Recurse: instructs tool to operate on files in specified directory and all subdirectories.
/d prompt Default answer used when the current user does not have the "list folder" permission on a directory. This occurs while operating recursively (/R) on sub-directories. Valid values "Y" to take ownership or "N" to skip.
/?   Displays help.


Contoh:
TAKEOWN /?
TAKEOWN /F lostfile
TAKEOWN /F \\system\share\lostfile /A
TAKEOWN /F directory /R /D N
TAKEOWN /F directory /R /A
TAKEOWN /F *
TAKEOWN /F C:\Windows\System32\acme.exe
TAKEOWN /F %windir%\*.txt
TAKEOWN /S system /F MyShare\Acme*.doc
TAKEOWN /S system /U user /F MyShare\foo.dll
TAKEOWN /S system /U domain\user /P password /F share\filename
TAKEOWN /S system /U user /P password /F Doc\Report.doc /A
TAKEOWN /S system /U user /P password /F Myshare\*
TAKEOWN /S system /U user /P password /F Home\Logon /R
TAKEOWN /S system /U user /P password /F Myshare\directory /R /A

Bagaimana cara menjalankannya, ya sudah pasti lewat Command Prompt ataupun melalui file BAT. Mari kita praktekan, jalankan program NOTEPAD di komputernya misal folder yang akan diubah permissionnya adalah D:\DATA, kita ketik didalam notepad terebut
@echo off
takeown /F D:\DATA
pause
Kemudian simpan, perlu digaris bawahi tipe dari file Save As Type All Files (*.*) dan akhir dari nama file berextensi BAT. misal TAKEOWN.BAT. Setelah file disimpan, jalankan file TAKEOWN.BAT dengan cara mengklik kanan file tersebut dan pilih Run As Adminisrator.
Selamat Mencoba!!!

Leave a Reply

tolong kalo copy artikel sertakan sumber dari web ini