WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

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

Offline freyone

  • Newbie
  • *
  • Posts: 24
/usr/local/etc/samba/smb.conf not writable?
« on: March 21, 2016, 11: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.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11702
Re: /usr/local/etc/samba/smb.conf not writable?
« Reply #1 on: March 22, 2016, 12:16:44 AM »
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: 14851
Re: /usr/local/etc/samba/smb.conf not writable?
« Reply #2 on: March 22, 2016, 03: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.