Access Denied when I run 'rustup doc' - rust

When I run rustup doc --book I get this:
Access to the file was denied.
The file at file:///home/ken/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/html/index.html is not readable. It may have been removed, moved or file permissions may be preventing access.
I've reinstalled, I've tried using chmod -R 777 on the directory. What else is there to try? The files are there.

As mentioned by C F M G, if you use a browser installed with Snap then it will not work. I tried this with the Firefox snap and got the same message as you, but was able to access the docs when using Ungoogled Chromium installed from Flatpak.

What browser do you use?. I use Brave and the same error occured to me. I solved it changing the default browser to Chromium. After that, all work perfectly.

Try changing your browser.
It didn't work for me with Chromium but Firefox works like a charm

Check if you are using a browser on snap; in this case apparmor restricts access to local files. you can fix this by replacing the snap version.

Couldn't open the Rust Document,the reason is chrom/firefix installed by snap!!!

Related

The Node JS FS Code which works perfectly on Windows Doesn't work in an Ubuntu server

the following Code Works Perfectly on My Machine, However When I put it online on an Ubuntu server, it seems it has some problems. I'm not sure why
if (!existsSync(`${some path}/${MemberID}`)){
mkdirSync(`${some path}/${MemberID}`);
}
I think It has something to do with different file systems in Windows and Linux.
I'm not even a Linux Beginner. thanks in advance :)
Think you don't have permissions to create directory
Use ls -l for check permissions
First of all make sure that path of ${some path} already exist.
Second, check that the access rights for the running node process has permissions to create that pathes.
Third, try on terminal / console (replace some path and MemberID with real path and value)
mkdir "some path/MemberID"

Postman doesn't have the required permissions to install Node.js and other dependencies

When I try to install interceptor to use cookies in postman I get the error that is mentioned in header. OS is linux.
I googled the error description but it is not mentioned anywhere. Any idea would be really helpful.
Well, there is not any answer here yet. But I found a workaround that is installing PostmanCanary. I couldn't install interceptor to Postman in Linux but I installed it to PostmanCanary successfully and it works perfect.
I had a similar problem, though I got the error code CHROME_NOT_INSTALLED as well. The solution was too simple: I had Chromium installed, not Chrome.
As per the troubleshooting tips it could happen if NativeMessagingHosts directory is missing,
this can be solved by creating NativeMessagingHosts directory in ~/.config/google-chrome/ in case of linux.
Reference: https://learning.postman.com/docs/sending-requests/capturing-request-data/interceptor/#troubleshooting-tips
And if desired to use interceptor on any other chrome based browser like brave, do the following
find the utils.js file. in my system the path looked like
/opt/postman/app/resources/app/utils/interceptor/utils.js
change the path of the key named LINUX to the path containing NativeMessagingHosts directory.
const nativeMessagingHosts = {
MACOS: '/Library/Application Support/Google/Chrome/NativeMessagingHosts/',
LINUX: '/.config/BraveSoftware/Brave-Browser/NativeMessagingHosts/',
WINDOWS: 'HKCU\\Software\\Google\\Chrome\\NativeMessagingHosts\\'
}
Here I changed the path from /.config/google-chrome/NativeMessagingHosts to /.config/BraveSoftware/Brave-Browser/NativeMessagingHosts/
Now try to install the interceptor again.
Make sure you have the following in the environment variable PATH:
C:\Program Files\Nodejs\
I have face same issue before, and later it got fixed.

Node fs Error: EPERM: operation not permitted, open

I get this error in my app:
Error: EPERM: operation not permitted, open 'C:\Program Files
(x86)\Full Menu\db\main.json'
The app I have is built with electron-boilerplate. I am using this function to get the path to the root of the app:
path.dirname(process.execPath)
And this is the script that writes the file:
fs.writeFile(apath + '/db/' + elem + '.json', JSON.stringify(results)
I know what the problem is: permissions. But how could I get this working without running the app as an administrator?
For the benefit of searchers; I has this error. I added full permissions for Everyone as a test, but that didn't fix it. The issue was that the file was set to readonly (by source control).
Unchecking the readonly option in the file properties fixed the issue.
On my Windows 10 machine, I encountered this error when running an old Node JS project. I think Node version 10.16.
In any case, it was trying to modify a dotfile in my project. Be sure that the file isn't hidden on Windows. After unchecking the hidden option in the file properties pop up. Everything worked.
So to fix:
Right click file in Windows Explorer
Select properties
Uncheck Hidden
Click Ok
Re-run your command.
If you have the file that you can't open or modify mounted as a volume in docker restarting docker should fix the issue.
i had to run the node command prompt as administrator and that fixed the issue.
I face this issue when I was deleting a file/folder.
Solution:
Just restart your code editor/ terminal
Or
Restart your computer
If you are facing this issue on Windows 10, then please try the following:
Uncheck readonly options for the folder (if read-only reverts, login as administrator)
Open terminal as administrator (if you are facing this issue on terminal)
Switch off ransomware folder protection
Change chmod of the folder
Check if the folder is hidden or not
Disable antivirus protection (temporarily) and try this
Or move your project folder somewhere else, where antivirus ransomware protection is disable.
If nothing above works, then try the following:
https://appuals.com/how-to-fix-folder-keeps-reverting-to-read-only-on-windows-10/.
Hope this would of help.
I think that you must change the permissions recursively to the file so the user executing your script can read / write this file.
https://fr.wikipedia.org/wiki/Chmod
Restarting my computer fixed this problem for me.
I had this issue too. I'm using TFS (or VSO, Azure DevOps, etc.) for source control. I was trying to compile from .scss to .css and it couldn't open my .css. I just needed to right-click on my .css file and Check Out for Edit...
I had the error because i have already open the file before
var stream = fs.createWriteStream(outputFileName, {flags:'a'})
var output = fs.createWriteStream(outputFileName, {flags:'a'})
this is not an exact answer but may help:
i think if you want to read or readSync a file that doesn't exist you will encounter an EPERM error...
in many programming languages, any permission related error may not
directly means an actual permission issue
for example in PHP Folders (not files) must delete by php rmdir() method but if you want to do that with unlink() , u will encountered with a wrong Warning message that says "permission denied"
I was facing the same problem using the following software:
Windows 10
GitBash
Node v19
I was able to solve it opening GitBash as admin
I had the same problem, when i tried to create and write to a file using NodeJS. I thought it had to do with my windows file/folder access permissions, but after restarting my computer and running the code again, I still got the same error.
However, this time around my antivirus gave me a pop-up message also, stating that it blocked permission for Node.exe to write or open files. So once I flagged Node.exe as safe for my anti-virus program (Avast).
It worked for me. Disabling my antivirus could've also temporarily fixed it, I guess.
If you use windows 10, you must turn off Ransomware protection. Ransomware protection will prevent all folder and file changes.You can turn off it in Windows Security Center. See screenshot below:

Taglist: Exuberant ctags not found in PATH

This morning, I started getting that message when I attempt to open a file in Vim. Vim is my editor of choice for config files, git commit messages and the like, but is not my day to day code editor. I clearly did something to invite this message, but I have no idea what. I did recently uninstall an older version of XCode from /Developer-3.2.6, but that's the only thing that comes to mind that seems even tangentially related.
I'm running OSX Lion. Is Excuberant ctags part of the base install? I know I didn't install it intentionally, but if it's not native, then maybe it came along with something else? Any ideas about how to either get the plugin back or remove references to it so I don't get the warning message?
Thanks.
For Ubuntu and derivatives:
sudo apt-get install exuberant-ctags
With yum:
sudo yum install ctags-etags
FWIW I had the same error message on Ubuntu, I simply installed ctags and everything hunky dory. Thanks :)
That looks a lot like the message the taglist plugin emits when it can't find a ctags program. If you run :scriptnames, do you see plugin/taglist.vim in the list of sourced files? If you do, then you'll probably want to remove that and doc/taglist.txt under the same directory structure.
If you are using Gvim in a Windows system, you should download a ctag Windows program (that is ctag.exe) and put the ctag.exe in the vim74 file dir, then reboot Gvim, and it will find it and use it! I hope this is helpful.
Take a look at this: http://vim-taglist.sourceforge.net/installation.html
Thanks, guys. I ended up reinstalling XCode and it looks like the problem has gone away. I have no idea how I got it into whatever state it was in, but it's back now and everything looks to be back to normal.
I encountered the same issue after upgrading to Mountain Lion. I fixed it by reinstalling the CLI tools from XCode preferences > Downloads. I had the CLI tools installed before upgrading. Not sure what happened, but it works now.
I encountered this issue on a host, but I didn't have permission to install any packages.
But i did find out the gctags was present on that system.
I created a softlink for the gctags binary in a location that was included in my PATH environment variable.
$ln -s /usr/bin/gctags ~/bin/ctags**
You can do the same if you find etags binary in your system, and have no way to install any packages.

How do I log errors from Xul to a file?

I tried export XRE_CONSOLE_LOG as told in this page, but had no result.
Also, I would like to see in a file all errors I see in my console (as XPCom errors, not only javascript errors).
--update
I'm Running Xulrunner 1.9.2 on Ubuntu 10.04.
If you are seeing chrome errors but they do not get written to the file you indicated, maybe the file path contains an error? What OS are you on?
Are you correctly set all developer environment options?

Resources