[英]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.以下代码在我的机器上完美运行,但是当我将它放在 Ubuntu 服务器上时,它似乎有一些问题。 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.我认为这与 Windows 和 Linux 中的不同文件系统有关。 I'm not even a Linux Beginner.
我什至不是 Linux 初学者。 thanks in advance:)
提前致谢:)
Think you don't have permissions to create directory认为您没有创建目录的权限
Use ls -l
for check permissions使用
ls -l
检查权限
First of all make sure that path of ${some path} already exist.首先确保 ${some path} 的路径已经存在。
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)三、在终端/控制台上尝试(用真实的路径和值替换一些路径和成员ID)
mkdir "some path/MemberID"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.