Windows directory with no permissions - windows

I accidentally removed all permissions from a directory on a Windows 2008 server. I can see the directory when listing contents of its parent both through Windows Explorer and DOS, but I can't do anything else. No matter what I try, the system essentially acts like I'm trying to work with a directory that doesn't exist. Trying to change the permissions through Windows Explorer yields a message that the security information is not available (on the Security tab). I've also tried takeown and modifying permissions with icacls, both of which report file not found. My account is part of the Administrators group. The account that created the folder (the owner before I messed up the permissions) can't even see the directory when listing contents of its parent. dir /q reports the owner of the directory as "...". Is there anything that can be done here or is this directory lost?

The solution here was to log in using the local administrator account and run takeown /F on the directory in question. From there, I was able to reset the permissions of the directory and all of its contents.

Related

dhcpsapi.exe File keep running in task manager

I have a file with description "Подключаемый модуль пересылки событий WS-Management" and name dhcpsapi.exe running in task manager. It seems like a virus to me.Whenever i tried to delete or open its location i am getting access denied in my admin account.Tried to delete it from cmd-Administrator but keep getting the error 'Access Denied'.
I can't see its folder in file explorer or in hidden files but can see it in command prompt (dir /a).
I need to access this folder and delete it. How do i access it from command prompt or from windows explorer.
Screenshot of file properties
Resolved. I unchecked hide protected items from folder options. Then gave permission to User but it was still inaccessible and windows defender scanned that folder and identified it as a trojan virus and removed the process from task manager. Then i deleted that folder with a software 'unlocker' from drive and recycle bin.
Screenshot of file details

Access Denied message when trying to open hidden folder in windows

Earlier i was using one batch file to lock my file/folder in windows. That time i locked my one folder from D Drive. It was working fine for me. But after some windows update i am not able to unlock my folder using this batch file.
I know this batch file is using cacls command to change the attribute of folder. It changes it's attribute as hidden and system folder. I tried cacls command as well from cmd but still it gives me Access Denied error.
Please suggest me any approach to get access to this folder. It will be appreciated.
Thanks!

Access is denied on mklink

I am trying to get a symlink working over a network drive.
I have already tried suggestions on questions already asked, such as running as administrator and checking if the directory already exists. Unfortunately it still gives me the following error:
C:\Windows\system32>mklink /d \\myserver\someLink \\myserver\mydir
Access is denied.
Any ideas how I could get this working? The local machine is running windows 7 and the remote machine is running windows server 2008 R2 standard.
I jumped through all the hoops:
Create a non-admin account (in my case, activated the guest account).
As Admin, run secpol.msc and grant this account Create Symbolic Link permissions.
runas /user:guest cmd to open a command window as the guest.
only to get caught on the simplest problem: because I was running as guest, I didn't have write permissions within the directory. So,
As admin, change permissions in the target directory (where you want to make the link) to give write access to the non-admin user.
I had this while I wanted to create a hard link with mklink /H ....
By removing the /H, the error vanished as well.
So if a symbolic link does the trick for you as well, you should try this.
This is a little silly, but make sure you're using /D (soft) or /J (hard) for directories or you'll get access denied.

File ownership under "Program Files" in Windows

We are creating an application that updates it's files under Program Files - we've run into some permission errors and were starting to wonder who should be owner of files - the "SYSTEM" user or the one that installed the software? After inspecting the "Program Files" folder we see that some software binaries have the user as owner, some "SYSTEM". We are failing to overwrite some files and the only weird thing seems to be that the owner of our updater binary is the "SYSTEM" user.
Is always better to install apps that needs write permissions in a folder under C: or you can look at ntfs permissions on that folder and add your users.

error when i want to save java file in jdk/bin

when i save java file error is you dont have permission to save in this location contact the administrator to obtain permission on window7
Don't store application data in the "Program Files" directory.
It is very bad design and regular users don't have write access to that directory (for a very good reason).
So even if you changed your settings locally to open up the door for viruses your application won't run on other computers.
Besides: storing a Java file in the JDK directory serves no purpose at all.
Btw: your uppercase letters are broken, as well as the dot or the comma...
That's normal - jdk/bin is the installation directory of the JDK, regular users cannot (and should not) write files there. You'll have the same problem on Linux/Unix and on Mac OS X, where installation directories are off-limits to regular users.
Write your files to the users home directory (System property "user.home", works across platforms), or let the user choose where you save stuff.
Bin directory do not allow directly to save program in it.
it is so simple, just save your .java file on desktop and then copy paste it in Bin. done ;)
If the file can't save directly to c:\program files\java\jdk1.8.0\bin\
Solution:-
Click start Menu type Notepad command in run run as administrator
Right click the Notepad run as Administrator, then type the program file can save directly to c:\program files\java\jdk1.8.0\bin\
Just try it......

Resources