- Debian User Forums
- Configuration files randomly become unwritable
- Configuration files randomly become unwritable
- Re: Configuration files randomly become unwritable
- Re: Configuration files randomly become unwritable
- Re: Configuration files randomly become unwritable
- Re: Configuration files randomly become unwritable
- Re: Configuration files randomly become unwritable
- Re: Configuration files randomly become unwritable
- Re: Configuration files randomly become unwritable
- Re: Configuration files randomly become unwritable
- Re: Configuration files randomly become unwritable
- Re: Configuration files randomly become unwritable
- Re: Configuration files randomly become unwritable
- ‘[Error writing /filename: Permission denied]’ while trying to save a file using the nano editor
- 6 Answers 6
- Невозможно редактировать системный файл / snap / phpstorm… даже с учетной записью root в Ubuntu 18.04 [дубликат]
- 1 ответ
Debian User Forums
Configuration files randomly become unwritable
Configuration files randomly become unwritable
#1 Post by ciniath » 2011-08-15 15:03
Occasionally, with no warning and no cause that I’ve been able to see, everything that I try to open will produce an error message saying that an associated configuration file (located in /home/
Re: Configuration files randomly become unwritable
#2 Post by smallchange » 2011-08-15 15:14
peter_irich Posts: 1384 Joined: 2009-09-10 20:15 Location: Saint-Petersburg, Russian Federation Been thanked: 5 times
Re: Configuration files randomly become unwritable
#3 Post by peter_irich » 2011-08-15 16:58
when
You can enter «id» as user, gid=nnn() in output will show your group.
Re: Configuration files randomly become unwritable
#4 Post by confuseling » 2011-08-15 22:54
Further to smallchange’s suggestion, I had various dotfile and permissions problems once on another distro apparently caused by running graphical things at an ‘su’ prompt rather than ‘su -‘.
Run graphical applications safely as root in KDE by alt-f2 and then ‘kdesu [program]’, I think.
The Forum’s search box is terrible. Use site specific search, e.g.
https://www.google.com/search?q=site%3A . terms+here
Re: Configuration files randomly become unwritable
#5 Post by vbrummond » 2011-08-15 22:55
I concur. I have heard multiple reports of this. Graphical applications need to use gksu/gksudo/kdesu/kdesudo and not sudo/su.
Re: Configuration files randomly become unwritable
#6 Post by ciniath » 2011-08-17 00:08
I tried changing the permissions for /home/
Re: Configuration files randomly become unwritable
#7 Post by smallchange » 2011-08-17 02:32
aspnair Posts: 1247 Joined: 2009-06-18 12:27 Location: Twitter: @anand_sivaram
Re: Configuration files randomly become unwritable
#8 Post by aspnair » 2011-08-17 04:06
In order to see the files which are not owned by a user ‘username’ do the following, review them and change the ownership/permission
to username as suggested above
find /home/username ! -user username
Re: Configuration files randomly become unwritable
#9 Post by ciniath » 2011-08-17 14:19
All of the files in /home/
Re: Configuration files randomly become unwritable
#10 Post by smallchange » 2011-08-17 15:51
If the file does not exist and you are getting a message about being unable to write to it the logical thing to do is create it. Use the same ownership and permissions as the other files. See if that solves the problem.
aspnair Posts: 1247 Joined: 2009-06-18 12:27 Location: Twitter: @anand_sivaram
Re: Configuration files randomly become unwritable
#11 Post by aspnair » 2011-08-18 13:58
Also make sure that your hard drive does not have any issue. Normally there is «remount-ro» option in fstab.
Do the following.
As soon as you login, clear the kernel log message, as root
Re: Configuration files randomly become unwritable
#12 Post by ciniath » 2011-08-19 18:26
aspnair, you were right. I got the following error messages in the kernel log:
[ 318.183092] EXT3-fs error (device sda1) in ext3_free_blocks_sb: Journal has aborted
[ 318.183101] EXT3-fs error (device sda1) in ext3_free_blocks_sb: Journal has aborted
[ 318.183111] EXT3-fs error (device sda1) in ext3_free_blocks_sb: Journal has aborted
[ 318.183120] EXT3-fs error (device sda1) in ext3_free_blocks_sb: Journal has aborted
[ 318.183128] EXT3-fs error (device sda1) in ext3_free_blocks_sb: Journal has aborted
[ 318.183137] EXT3-fs error (device sda1) in ext3_free_blocks_sb: Journal has aborted
[ 318.183149] EXT3-fs error (device sda1) in ext3_free_blocks_sb: Journal has aborted
[ 318.183156] EXT3-fs error (device sda1) in ext3_free_blocks_sb: Journal has aborted
[ 318.183165] EXT3-fs error (device sda1) in ext3_free_blocks_sb: Journal has aborted
[ 318.183173] EXT3-fs error (device sda1) in ext3_free_blocks_sb: Journal has aborted
[ 318.183185] EXT3-fs error (device sda1) in ext3_free_blocks_sb: Journal has aborted
[ 318.183200] EXT3-fs error (device sda1) in ext3_reserve_inode_write: Journal has aborted
[ 318.183207] EXT3-fs error (device sda1) in ext3_truncate: Journal has aborted
[ 318.183215] EXT3-fs error (device sda1) in ext3_reserve_inode_write: Journal has aborted
[ 318.183221] EXT3-fs error (device sda1) in ext3_orphan_del: Journal has aborted
[ 318.183228] EXT3-fs error (device sda1) in ext3_reserve_inode_write: Journal has aborted
[ 318.227790] __journal_remove_journal_head: freeing b_committed_data
[ 318.227803] __journal_remove_journal_head: freeing b_committed_data
[ 318.227810] __journal_remove_journal_head: freeing b_committed_data
[ 318.227816] __journal_remove_journal_head: freeing b_committed_data
[ 418.329055] CE: hpet increasing min_delta_ns to 15000 nsec
[ 690.495918] virtuoso-t[2418]: segfault at ffffffffffffffff ip 00000000007c0b3f sp 00007f298c044de0 error$
I can see that this is something to do with the hard drive, but is it a hardware or software problem? (and can it be fixed?)
‘[Error writing /filename: Permission denied]’ while trying to save a file using the nano editor
Using the Nano text editor, I’m trying to save and exit a file. I already have the file named. I click Ctrl + X to exit. And then I click Y because I want to save the file. It asks for file to write, I pressed Enter to use the default name because its already named. The problem is I get this message.
[Error writing /filename: Permission denied]
Check the permissions of the file to make sure that you have write permissions. ls -l *filename* will show the permissions for that file.
6 Answers 6
Well, you don’t have the rights to write that file. Use
So there’s no way to issue a sudo save while editing the document? i.e. like vi’s :wq! ? So if you’ve spent a while editing a document without realising it’s protected, there’s no way to save it? Bit of an oversight.
You can save to a different filename — hit Ctrl-X, Y, then change to a different filename to write to. That way you can sudo mv it after you edit
If you’re the admin, open another terminal
go back to your «nano» terminal save the file. Change permissions back on the filename if you care, they wee most likely 755
I got your problem and to resolve this error there is an easy way. Basically, you need to do nothing but switch from normal user to root user and for that type the command:
and then hit Enter . su means «switch user».
Now you have full access, so do whatever you want to do because now you have super user’s power.
To create a file in the nano text editor simply type:
then hit Enter . Now you can use all features of nano without any interruption.
Невозможно редактировать системный файл / snap / phpstorm… даже с учетной записью root в Ubuntu 18.04 [дубликат]
Я установил пакет snap в пакете Ubuntu 18.04 и хочу отредактировать один из его файлов, используя учетную запись root. Сначала я переключился на root с помощью su , но затем, когда я открыл файл в nano, он сказал мне:
[ File '/snap/phpstorm/36/bin/phpstorm64.vmoptions' is unwritable ]
Затем я попробовал следующее:
root@elahe-VPCEA31FX:/home/elahe# sudoedit /snap/phpstorm/36/bin/phpstorm64.vmoptions
после указанной выше команды файл открылся в nano, но после внесения изменений и сохранение с помощью Ctrl + O и после выхода с Ctrl + x я получил это сообщение:
sudoedit: unable to write to /snap/phpstorm/36/bin/phpstorm64.vmoptions: Read-only file system sudoedit: contents of edit session left in /var/tmp/phpstorm64XXRCQzZi.vmoptions
Я даже пытался изменить разрешения файла с помощью этой команды:
root@elahe-VPCEA31FX:/home/elahe# chmod 755 /snap/phpstorm/36/bin/phpstorm64.vmoptions
chmod: changing permissions of '/snap/phpstorm/36/bin/phpstorm64.vmoptions': Read-only file system
Это действительно удивительно, что пользователь root не может редактировать файл! Это ошибка?
1 ответ
Поспешные файлы смонтированы как только для чтения (ro), и можно проверить это при помощи команды монтирования.
mount |grep snap /var/lib/snapd/snaps/vlc_158.snap on /snap/vlc/158 type squashfs (ro,nodev,relatime,x-gdu.hide) /var/lib/snapd/snaps/core_4486.snap on /snap/core/4486 type squashfs (ro,nodev,relatime,x-gdu.hide) /var/lib/snapd/snaps/core_4571.snap on /snap/core/4571 type squashfs (ro,nodev,relatime,x-gdu.hide) /var/lib/snapd/snaps/vlc_365.snap on /snap/vlc/365 type squashfs (ro,nodev,relatime,x-gdu.hide) /var/lib/snapd/snaps/vlc_190.snap on /snap/vlc/190 type squashfs (ro,nodev,relatime,x-gdu.hide) /var/lib/snapd/snaps/core_4650.snap on /snap/core/4650 type squashfs (ro,nodev,relatime,x-gdu.hide)
Для изменения файлов в squashfs необходимо не раздавить его, изменить файлы и затем переделать squashfs файл. Например, если я хочу изменить файлы в /var/lib/snapd/snaps/vlc_365.snap
sudo umount /snap/vlc/365 sudo unsquashfs /var/lib/snapd/snaps/vlc_365.snap
Измените что-либо, в чем Вы хотите squashfs-root (это — где все файлы распакованы в), и затем переупакуйте его.
sudo mksquashfs squashfs-root vlc_365.snap
Скопируйте его назад в его исходное местоположение и повторно смонтируйте его.
sudo cp vlc_365.snap /var/lib/snapd/snaps/vlc_365.snap sudo mount -t squashfs -o ro,nodev,relatime,x-gdu.hide /var/lib/snapd/snaps/vlc_365.snap /snap/vlc/365