Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Programs can't write to linked .viminfo and .bash-history file

Featured Replies

I wanted my bash history and vim settings to stay from session to session.  So I moved my .bash_history and .viminfo from /root/ to /boot/config.  I then create a link to them (with ln -s) to /root/ in my go script.

 

This was working just fine for a while.  I just noticed within the last couple of weeks that this no longer works.  I noticed this when I received the message "E138: Can't write viminfo file /root/.viminfo!" when exiting vim.  Thinking it strange, I tried to see if my .bash_history was being updated.  It also wasn't being written to.

 

I'm a bit confused as if I do

# echo "test" >> /root/.bash_history

I get no errors and I can write to the file perfectly well.

 

Can someone shed light on why this is happening all of a sudden?  I was running rc15a when this this issue occurred.  I have since upgraded to 5.0 hoping it would solve the issue.  It hasn't :(

 

Can I provide any more info to shed light on the issue?

 

Thanks a ton!

  • Author

Thanks.  Here are the permissions in the /root/ folder

root@Tower:~# ls -al
total 24
drwx--x---  3 root root    0 2013-10-24 22:09 ./
drwxr-xr-x 17 root root    0 2010-05-12 02:38 ../
lrwxrwxrwx  1 root root   26 2013-10-24 22:09 .bash_history -> /boot/config/.bash_history*
-rw-r--r--  1 root root   70 2013-10-24 22:09 .bash_profile
-rw-rw-rw-  1 root root   19 2013-10-24 22:09 .inputrc
drwxrwxrwx  3 root root    0 2013-10-31 22:33 .mc/
lrwxrwxrwx  1 root root   21 2013-10-24 22:09 .viminfo -> /boot/confic/.viminfo
-rw-rw-rw-  1 root root   22 2013-10-24 22:09 .vimrc
-rwxr-xr-x  1 root root  171 2013-08-28 13:48 mdcmd*
-rwxr-xr-x  1 root root 7565 2013-08-28 13:48 mkmbr*
lrwxrwxrwx  1 root root   25 2013-08-28 13:48 powerdown -> /usr/local/sbin/powerdown
lrwxrwxrwx  1 root root   18 2013-08-28 13:48 samba -> /etc/rc.d/rc.samba*
root@Tower:~# 

I'm specifically looking at these two files.

lrwxrwxrwx  1 root root   26 2013-10-24 22:09 .bash_history -> /boot/config/.bash_history*
lrwxrwxrwx  1 root root   21 2013-10-24 22:09 .viminfo -> /boot/confic/.viminfo

 

For reference, this is where the files are stored:

root@Tower:/boot/config# ls -al          
total 2112
drwxrwxrwx  4 root root 65536 2013-10-23 00:48 ./
drwxrwxrwx 11 root root 16384 2013-10-31 08:10 ../
-rwxrwxrwx  1 root root  8671 2013-10-31 22:56 .bash_history*
-rwxrwxrwx  1 root root  4698 2013-10-24 22:09 .viminfo*
-rwxrwxrwx  1 root root   256 2013-02-09 12:51 Plus.key*
-rwxrwxrwx  1 root root  2216 2013-07-10 07:55 disk.cfg*
-rwxrwxrwx  1 root root   101 2013-03-24 08:04 flash.cfg*
-rwxrwxrwx  1 root root   884 2013-09-08 23:31 go*
-rwxrwxrwx  1 root root   300 2013-10-12 23:00 ident.cfg*
-rwxrwxrwx  1 root root    73 2013-01-11 12:54 network.cfg*
-rwxrwxrwx  1 root root   892 2013-05-06 22:37 passwd*
drwxrwxrwx  2 root root 65536 2013-05-14 22:03 plugins/
-rwxrwxrwx  1 root root 24576 2013-10-24 22:05 secrets.tdb*
-rwxrwxrwx  1 root root   705 2013-05-06 22:37 shadow*
-rwxrwxrwx  1 root root   364 2013-10-12 23:00 share.cfg*
drwxrwxrwx  2 root root 65536 2013-08-01 20:35 shares/
-rwxrwxrwx  1 root root   332 2013-05-06 22:37 smbpasswd*
-rwxrwxrwx  1 root root  4096 2013-10-24 22:08 super.dat*
-rwxrwxrwx  1 root root     4 2013-10-12 23:01 vsftpd.user_list*

 

I don't know if anything is wrong with permissions.  My worry is, everything WAS working and then at some point, it stopped :(  And I have no idea what changed in the middle.

 

Is it something to do with the files being linked?

 

Thanks a ton!

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.