Ali*_*ehi 2 linux permissions elementary-os
假设我的 Linux(基本操作系统)中安装了一个产品:
\n\n\n名称=“基本操作系统”版本=“6.1 J\xc3\xb3lnir”
\n
我的系统中还安装了 Windows 10(双启动),我想对源代码进行一些更改,但我不断收到此错误:
\nchmod: changing permissions of \'filename\': Read-only file system\nRun Code Online (Sandbox Code Playgroud)\n它恰好发生在这个文件/目录上。
\n我尝试过的事情:
\nmount -o remount,rw \'/myfile/directory\' : which returns no errorchown -R root:root /mydir但它们都不起作用。看起来该产品锁定了自己的源文件(这是我的最佳猜测)。
\n那么我该如何解决这个问题呢?
\n编辑1:
\n这是一些实际的终端输出:
\nroot@qwxp# chmod g+rw current\nRun Code Online (Sandbox Code Playgroud)\n\n\nchmod:更改“当前”的权限:只读文件系统
\n
root@qwxp# mount -o remount,rw /snap/pycharm-professional/current /`\nRun Code Online (Sandbox Code Playgroud)\nmount 命令没有输出,只有当我不给它一个安装点时它才会返回:
\n\n\nmount: /snap/pycharm-professional/271: 无法重新挂载 /dev/loop6 读写,已被写保护。
\n
root@qwxp# chmod g+rw current\nRun Code Online (Sandbox Code Playgroud)\n\n\nchmod:更改“当前”的权限:只读文件系统
\n
root@qwxp# ls -al\n\ntotal 8\n\ndrwxrwxrwx 3 root root 4096 Mar 5 05:46 .\n\ndrwxr-xr-x 13 root root 4096 Mar 5 06:24 ..\n\ndrwxr-xr-x 11 root root 239 Jan 27 18:52 271\n\nlrwxrwxrwx 1 root root 3 Mar 5 05:11 **current -> 271**\n\n-rw-r--r-- 1 root root 0 Mar 5 05:46 hi.txt\n\nRun Code Online (Sandbox Code Playgroud)\n
如果你运行df -hT /snap/pycharm-professional/current你可能会发现这是一个类型的文件系统squashfs。
Squashfs 文件系统在设计上是只读的,没有内置方法来修改文件系统的任何部分。
这似乎是一个快速安装的应用程序。从您的问题中不清楚您为什么要修改应用程序的部分内容。可能有一种更简单的方法可以完成您正在尝试的操作,但您没有提供足够的详细信息来确定这一点。