I recently was given Admin rights on my machine on work.
Unfortuanately when I am going through the directory structure I ket geting this message box:
If I hit continue, it works. But it is time consuming and it may be interfering with some of my development efforts.
Is there any way to just get permanent access to everything?
Thanks!
UAC is disable ?
If not, I'll suggest to you to do this :
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
Put EnableLUA to 0 (if you want to reactive UAC put 1)
Others solutions :
http://www.petri.co.il/disable-uac-in-windows-7.htm#
Make new folder,and than copy files.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I'm trying to delete a folder as an administrator, but I get the message "You require permission from UserAdam to delete folder". The problem is, I am logged on as UserAdam! I've tried changing the owner to Administrator to no avail also.
I ran into the same problem: tried to delete a folder (as admin), but got an error message "You need permissions from MYCOMPUTER\Admin ..." Somehow this worked:
I just went into the folder and deleted everything inside. Now when I try to delete the folder, it works fine.
Not sure why, but it seems like you found a similar solution. However, there's no need to use FileAssassin, just simply highlight the folder contents and delete like normal.
I had the same problem, and I found a fairly simple fix that hasn't been mentioned yet and probably has the best chance of working.
Simply give full access to "Everyone" in the file's properties, then delete it right after.
To change the file's access, as administrator: open the context menu and go Properties -> Security -> Advanced. This should bring up a new window that lists multiple users and their access to the file/folder, specifically Everyone. Select Everyone and click edit. In the following menu, select Full Control, then click OK.
The file should now be accessible to everyone- including you- allowing it to be deleted.
This worked for me:
Open command prompt as administrator
Execute rd /S /Q "P:\Ath\To\Directory"
I got no error and my folder was succesfully deleted.
To add some additional detail, in the case of needing permission from yourself, It's likely that you currently have an application that is using a file/ has a lock on that folder/files inside that will throw an error.
Closing relevant applications may remedy this, if not a restart will clear all the file locks which might free it.
If neither of those things work then the ACL permissions on the folder are probably malformed and corrupted somehow
If you have the project open in Visual Studios, close out of it and then delete the file.
Had this problem today and didnt see this answer anywhere
One important "fix" for this issue which must be mentioned:
Try rebooting your machine first!
In some cases this is capable of fixing user control issues, where a file belongs to the current user, yet the current user is unable to change access or remove the file, due to "Access denied".
I think its a bug or something. When the file is in use (It's open in sublime text or maybe some other text editors) it won't say file in use. Instead, it will say you don't have permission. If you don't know what it's open in, logout and it should be deletable. (At least that's what happened to me)
If you tried changing the permissions to 'everyone' for the folder through the security tab and it still asks for "myself"'s permission, then there must be files or folders inside this folder whose permissions need to be changed too. I just found out this, changed the permissions and now happily deleted the troublesome folder.
I had the same issue and I had to enable inheritance.
Is it possible for someone with Administrator access to easily create arbitrary files (e.g. text documents) within the C:\Inetpub\wwwroot folder under Windows 8.1?
Normally right-click presents me with many file types I can create; here, I'm only given the option to create a new sub-folder, even though I can (i) edit existing files there or (ii) create files elsewhere and move them there. (Also, gvim running with administrator access can't create a (new) swap file there).
I created a subfolder ("test"), and took ownership of it, but it made no difference. One of my colleagues thought that this was a "special case" overridden by IIS and could be configured by the Group Policy Editor somehow?
I've heard that disabling UAC solves the problem, but I don't want to do that!
Any ways round this? (Reference to an existing discussion I missed would be fine if it covers the same problem). Thanks!
Smychi
Solved this; I added the specific administrative user account I was logged in under ("User") to the list of permissions and granted myself "Full Control".
Not sure why this didn't already work with the existing groups settings, though I'll admit my knowledge of Windows permissions isn't as good as it should be.
Feel free to say whether this is a good or bad way to do it, or add any comment to this anyway, for my benefit or for others who might stumble across this.
Smychi
I am working on a WinForm application, that allows working to work with "projects" (think about the application as Visual Studio, and projects as VS Solutions).
My question is - where should the application keep its logging files?
Some requirements include:
the application might not be running as an administrator (so saving in the %ProgramFiles% installation folder is not a good option)
The logs should be accessible to end-users (either for review, or for sending to the support team). (This means that hard to find folders, like %AppData%\Company\Application\Version\ProjectName... are not a good solution either)
The application might generate logs even when there are no open projects (so saving the logs in the project's folder is good only when there's a project, but not a final solution).
I was thinking of creating a "working folder" when the application is installed - something along the lines of C:\Application\, and then save the logs in a subfolder, like %WorkingFolder%\Logs\ProjectName
Thanks for the input.
Somewhere in the user's directory is actually the correct place to store them if they are specific to the current running user.
Some programs create folders at the top level of the User's directory, next to Documents and Desktop, others do it in Documents.
Creating it in C:\ might cause issues if the user doesn't have write access to the root directory. You can pretty much guarantee the user will have write access to the Home directory.
The other option is to look for an environment variable, and if its set use the value as the location, if not default to the User's home directory.
If the logs are user only you should store them at %AppData%\Company\Application Name.
If the logs are shared (any user can see any log) you should store them at:
%ProgramData%\Company\Application Name (for Vista+)
or
%AllUsersProfile%\Application Data\Company\Application Name (for XP-)
As for user access, you can add a shortcut to the start menu to the appropriate location or have a link within the program.
Another option in Vista+ is the Public folder (%Public%) which has links throughout Explorer for easy access to.
Where should I write program data instead of Program Files is a good blog entry by Chris Jackson from Microsoft. While it isn't an "official stance" it holds some excellent information.
You can always ask the user to configure this. Set a default path, maybe the application directory. During installation or while setting up the application you may prompt the user to input the path they want to use for logs. That's fair, right. If they're advanced enough to use logs they're good enough to configure a path too.
What do you plan to do with the logs. Are they technical, of for financial/security audits?
The EventLog is a nice place for technical logs, because you can access it remotely (within the Domain) and it is cleaned up automatically.
The %AppData% is also a good place for technical logs, specially if you are unable to connect to the eventlog. You can find the log files, and you can direct the end-user to them, but they are not "in the face" of the end-user. You can include a "send log to the maker" button to receive them.
For logs that needs be accessed by end-users, the My Documents (or a subfolder) looks good.
You can just to add button / menu item to easy open folder with logs.
Best place fo logs are %AppData%\AppName or %temp%\AppName.
Never use %MyDocs% or %Program Files%.
I'd suggest adding that question to the installer so that the user that installs the software can decide where best to put the logs. Though C:\[AppName\ sounds like a reasonable default for your requirements.
Edit: Just thought off, it would probably be worth warning the user if the select a bad location (in Program Files or in the root of the system drive etc) and if they choose to create a new directory, automatically give that directory correct permissions during the installation.
I think %APPDATA%\YourCompanyName\YourAppName is the preferred location. To overcome your stated objection of this location being hard to find, you could pretty easily and quickly implement a simple support screen in your app to allow the end user the ability to access and email these logs without too much trouble, so that the user will not have to remember or manually navigate to the long path name to get to the logs.
I don't really like the idea of the user being able to set this location via the installer because of possible naming and permission issues.
If the app needs to maintain the log only for the users current logged in timespan, then you could keep it in c:/temp.
Most of my winapps, i leave it there, so automatically it gets deleted once the user logs off..
Ofcourse, this primarily depends on your requirement.
I am developing an application in cocoa which needs to copy a set of files to the system folder. When copying files to system folder I am getting a "Permission denied " error message . How can I resolve this problem.
Please any one help me...
Thanks in advance
It shouldn't be necessary to put anything in /System, and it's probably not a good idea anyway, as it could get wiped out by a system update. My guess is that whatever you're looking to do should be possible by some other means, e.g. using /Library or ~/Library.
Mac OS X uses a system of authorization that prevent application to copy files in system locations without warning. That's why you have to enter your credentials when installing a framework for example.
If you want to perform privileged operations in your application, I suggest you to read the Authorization Services Programming Guide and especially the Scenarios chapter: it will help you to decide how to do the file copy.
Use PackageMaker to make a proper Installer package, like I suggested on your previous question.
Good day
Im trying to implement a read/write privilege in a folder but no delete rights in windows server 2003. Does anyone knows how to set this kind of security? Thanks
"Change" permission is "RXWD" (read, execute, write, delete).
So if you remove the Delete right for that user it should work. Make sure you apply this permission to the folder, subfolders and all files. Also verify effective permissions for that this user (e.g. that this user is not part of some other group where he/she may get extra unwanted permissions)
The answer might be to use "DACL"s.
Had you tried the "Advanced" button?