windows 10 - permission denied when trying to delete folder - windows-10

I have a certain folder on my computer that I want to delete but I can't. I opened the cmd console as administrator and tried to delete the folder, but access was denied. It doesn't even let me change ownership on the folder. I'm using windows 10 64-bit. How can I delete the folder?
Thanks.

Try Lock Hunter , its a unlocker software which worked well for me

open power shell as administrator
cd c:\folderInQuestion
rm -r .\folderInQuestion\

If the folder lies outide of your specific User Account folder, then you will have to take ownership of the folder (or a parent folder) before you can delete it.
In my case, I needed to delete a subfolder that was nested deep inside my Projects folder, which sits at my root. Even though my account had "full control" (see this)
To take ownership of the folder, follow this: https://answers.microsoft.com/en-us/windows/forum/windows_10-files/give-permissions-to-files-and-folders-in-windows/78ee562c-a21f-4a32-8691-73aac1415373

Related

Linux - Permissions to Create Directory / Delete Directory and Files / Change Permission for an entire Drive

I need your help, in order to allow me, to create directories, delete files, save files in directories. Right now, I'm unable to do anything in this Drive "Ubuntu-Dados".
I've already tried a bunch varieties of commands, from this site, and including running Nautilus, "sudo chmod -R -v 777 *", and nothing is working. Below is the result of my attempt to this issue. I need access to do anything in this Drive. - I'm using Ubuntu 20.04

Configuring permissions to folder in ubuntu in order to prevent user's from removing files of others

I have a folder owned by a group named "wheel".
The 'ls' command details for that folder is:
drwxrws--- 2 tps wheel 4096 may 8 08:10 tsreports
(tps = a user, owner of the file, wheel = the group, tsreports = name of the folder)
I need to configure the folder permissions in such way that files written into it are still owned by the wheel group, but so that one member of wheel cannot delete another member's files.
I think I already managed the part where newly created files in the folder will be automatically owned by the 'wheel' group
(I used chmod g+s tpsreports in order to do that)
but I'm not sure how I can prevent one member of 'wheel' from deleting another's file.
I could use some help, Thanks.
On the internet, I found this URL, mentioning a "sticky bit", which might solve your problem.

Workspace Settings permission denied

I'm running Ubuntu 12.04LTS.
Have unpacked Visual Studio Code in a folder owned by my user id. All vscode files are owned by my user id (user and group).
Have Node.js, npm, typescript installed via apt-get (and npm).
Visual Studio code runs fine, however File->Preferences->Workspace Settings gives this error:
Unable to create 'vscode/settings.json' (Error: EACCES: permission denied, mkdir '/.vscode').
Any ideas on how to resolve this? Where is it trying to do the mkdir?
Thanks,
Bob Wirka
UPDATE: Sudo'd mkdir "/.vscode" (literally at the root level), and chown'd it recursively to my user and group. Voila! Now I can edit the settings.
So, is there a way to tell Visual Studio Code that it shouldn't be trying to use the root folder?
Mentioned in the update by the OP but thought I'll mention it explicitly. You need to change the permissions for the folder. The following command will change the owner of the directory so that you can open it without needing root privileges.
$ sudo chown <user-name> -R <directory-name>
I had same issue on my osx. I was able to solve this issue by change the permission to read and write in project folder.
Simply type
sudo chmod 777 -R <your_app_name_directory>.
This will give all permissions to all users, groups and others for read, write, execute.
-R gives recursively permissions to all nested files folders inside your directory.
If -R is not given then it gives permissions to current directory only, not to other directories inside.
Change the permissions to your folder
sudo chmod ugo+rwx your_folder

Access denied when trying to copy file Windows Vista

I have this batch that needs to run that the user has to execute that will copy a simple xml file. However, everything works fine on windows 2000/XP. However, on windows Vista I get an error 'Access Denied".
Even when I try and copy the file just using windows explorer on Vista I get the same error.
Is there anything I can do to make this file copy. Do I have to add any extra code to my bat file to enable copying of this file?
Many thanks.
#ECHO OFF
REM copy config file to the windows/system32
copy config.xml c:\windows\system32\DataLinks.xml
I'm guessing it's because you're trying to change windows\system32. Vista, 7 and future version of Windows require elevated privileges in order to change system32.
Do you really need to put this file in system32? If it's an arbitrary location, why not pop it in the user's AppData directory (%AppData%\DataLinks.xml)?
AppData is a standard directory that's been around since Windows 2000 that hides in the user's Documents and Settings or Users folder (depending on the version). It's a hidden but user-editable folder, intended for application settings that the user needs to be able to get to but is mostly only going to be used by your code.
You need elevated privs to copy to %windir%\system32
You shouldn't copy your config data into %windir% at all. That's for Windows. Use %AppData%.
If you do copy to %windir%, use the %windir% variable and don't hardcode the path C:\Windows
JS Bangs is right; use %windir% variable. Most of the time when you do that it won't give any errors.
Example:
#ECHO OFF
REM copy config file to the windows/system32
copy config.xml %windir%\system32\DataLinks.xml
But while would you? Just put it in any other one. Like AppData what was already said:
#ECHO OFF
REM copy config file to the windows/system32
copy config.xml %appdata%\DataLinks.xml

Is there a system variable that stores the location of a user's Dropbox?

At least in the linux version of Dropbox, the user can choose which folder becomes their Dropbox. Is there a simple way to get this programmatically?
Maybe this will give you a clue. http://wiki.dropbox.com/TipsAndTricks/TextBasedLinuxInstall
The Dropbox configuration is stored in a sqlite database in your ~/.dropbox folder.
I found a small script which edits the Dropbox folder location:
http://dl.dropboxusercontent.com/u/119154/permalink/dropboxdir.py
http://cmdlinetips.com/2012/05/how-to-change-dropboxs-default-directory-location/
The most forward way to force Dropbox to use another folder location is a symbolic link.
Stop the dropbox daemon and simply replace the default folder with a symlink:
> mv ~/Dropbox /other/dropbox/folder
> ln -s /other/dropbox/folder ~/Dropbox

Resources