linux dev log,无法打开日志文件“../log/backend_dev.log”进行写入?

博主在使用Symfony项目时,从Windows迁移到Linux后遇到日志文件权限问题。尝试写入后台_dev.log文件失败,尽管设置了777权限但仍无济于事。寻求帮助解决跨平台文件权限设置挑战。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

我是symfony的新手,我正在阅读Practical Symfony,我正在Linux和Windows上工作。我使用GitHub来移动我的更改。昨天,我在我的Windows机器上创建了一个小项目,并将其推送到github https://github.com/showketbhat/medicine。我今天在Linux机器上拉了代码,我改变了我的数据库的一些配置。现在,当我尝试打开我的索引页它让我看到以下错误信息: -无法打开日志文件“../log/backend_dev.log”进行写入?

500 | Internal Server Error | sfFileException

无法打开日志文件“d:\ sfproject \医药\日志/ backend_dev.log”写入。 堆栈跟踪

* at()

in SF_ROOT_DIR/lib/vendor/symfony/lib/log/sfFileLogger.class.php line 75 ...

72. $fileExists = file_exists($options['file']);

73. if (!is_writable($dir) || ($fileExists && !is_writable($options['file'])))

74. {

75. throw new sfFileException(sprintf('Unable to open the log file "%s" for writing.', $options['file']));

76. }

77.

78. $this->fp = fopen($options['file'], 'a');

我试图改变权限777 backend_dev.log文件,但没有发生。谁能帮我吗?

使用PHP symfony项目后:权限

>> chmod 777 /home/sfprojects/medicine/cache

>> chmod 777 /home/sfprojects/medicine/log

>> chmod 777 /home/sfprojects/medicine/symfony

....

....

2011-12-10

ScoRpion

Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-release-plugin/2.5.3/maven-release-plugin-2.5.3.pom Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-release-plugin/2.5.3/maven-release-plugin-2.5.3.pom (11 kB at 1.0 MB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/release/maven-release/2.5.3/maven-release-2.5.3.pom Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/release/maven-release/2.5.3/maven-release-2.5.3.pom (5.0 kB at 502 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/27/maven-parent-27.pom Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/27/maven-parent-27.pom (41 kB at 3.7 MB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/apache/apache/17/apache-17.pom Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/apache/17/apache-17.pom (16 kB at 1.5 MB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-release-plugin/2.5.3/maven-release-plugin-2.5.3.jar Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-release-plugin/2.5.3/maven-release-plugin-2.5.3.jar (53 kB at 4.1 MB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml (14 kB at 1.3 MB/s) Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml (21 kB at 764 kB/s) [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.954 s [INFO] Finished at: 2025-07-09T06:18:06Z [INFO] ------------------------------------------------------------------------ [ERROR] No plugin found for prefix 'spring-boot' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/root/.m2/repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException root@srv771551:~/jeecg-boot# cd ../jeecgboot-vue3 -bash: cd: ../jeecgboot-vue3: No such file or directory root@srv771551:~/jeecg-boot# npm install npm run dev npm ERR! code ENOENT npm ERR! syscall open npm ERR! path /root/jeecg-boot/package.json npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, open '/root/jeecg-boot/package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2025-07-09T06_18_32_236Z-debug-0.log npm ERR! code ENOENT npm ERR! syscall open npm ERR! path /root/jeecg-boot/package.json npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, open '/root/jeecg-boot/package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2025-07-09T06_18_34_357Z-debug-0.log root@srv771551:~/jeecg-boot#
07-10
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值