WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: /usr/local/etc/samba/smb.conf not writable?  (Read 2606 times)

Offline freyone

  • Newbie
  • *
  • Posts: 24
/usr/local/etc/samba/smb.conf not writable?
« on: March 21, 2016, 08:05:03 PM »
after i install samba.i try  to change the smb.conf. samba works normally.
but when i reboot the system.the changing of smb.conf lost.i am confusing.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11229
Re: /usr/local/etc/samba/smb.conf not writable?
« Reply #1 on: March 21, 2016, 09:16:44 PM »
Hi freyone
/usr/local/etc/samba/smb.conf  is not a file. It's a link to a file inside the  samba.tcz  extension. Extensions are packed
in a squash file system which is by design a read only file system. You need to replace the link with a copy of the file:
Code: [Select]
rm -f /usr/local/etc/samba/smb.conf
cp /tmp/tcloop/usr/local/etc/samba/smb.conf /usr/local/etc/samba/smb.conf
You should now be able to edit the file. Add the file to your backup by adding:
Code: [Select]
usr/local/etc/samba/smb.confto your  /opt/.filetool.lst file. Then run a backup. Note there is no leading / allowed.
Spend a little time learning about persistence by reading:
http://tinycorelinux.net/book.html

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14554
Re: /usr/local/etc/samba/smb.conf not writable?
« Reply #2 on: March 22, 2016, 12:06:18 AM »
/usr/local/etc/samba/smb.conf  is not a file. It's a link to a file inside the  samba.tcz  extension. Extensions are packed
in a squash file system which is by design a read only file system.
If we're speaking of the samba3 extension in the x86 tc-7.x repo, then this is not the case - the extension start-up script copies smb.conf into the filesystem so that it is editable.

If smb.conf is altered it needs to be added to a backup to survive re-boot.