Windows 7 Access is Denied

为君一笑 提交于 2019-12-13 20:09:05

问题


I'm trying to build the boost examples. I get the following error:

Access is denied.
Access is denied.
...found 9 targets...
...updating 2 targets...
gcc.compile.c++ bin\gcc\debug\hello.o
Access is denied.

    "g++"  -ftemplate-depth-128 -O0 -fno-inline -Wall -g     -c -o "bin\gcc\debu
g\hello.o" "hello.cpp"

...failed gcc.compile.c++ bin\gcc\debug\hello.o...
...skipped <pbin\gcc\debug>hello.exe for lack of <pbin\gcc\debug>hello.o...
...failed updating 1 target...
...skipped 1 target...

I'm not familiar with Windows 7, but I believe I have the correct access rights:

Can anyone shed some light on this error? Thanks.

Update:

Process Manager finds hundreds of non-SUCCESS results for bjam. A typical line, if it helps, has the properties:

Desired Access: Read Attributes
Disposition:    Open
Options:    Open Reparse Point
Attributes: n/a
ShareMode:  Read, Write, Delete
AllocationSize: n/a

I'm not sure how to act on this though.


回答1:


The easiest way to debug permission problems is to use the Process Monitor tool from Microsoft - there you can easily see on which object (file) and for which user the access denied error is occuring.




回答2:


The string bin\gcc\debug\hello.o implies that it is trying to put an object file in the compiler's installation directory. You don't have permission to write there. You need to make it put its files in your hello directory.




回答3:


Right-click on folder -> Properties

Security Tab

Click on Advanced button

Owner tab

Edit.. button

select Administrators in 'Change owner to', check 'replace owner on subcontainers and objects'..this might take a while



来源:https://stackoverflow.com/questions/4009880/windows-7-access-is-denied

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!