1

I am attempting to install an FTP server and continue to get this error code when installing samba.

/var/lib/dpkg/info/samba4.postinst: 14: /var/lib/dpkg/info/samba4.postinst: /usr/share/samba/setoption.pl: Permission denied
dpkg: error processing samba4 (--configure):
 subprocess installed post-installation script returned error exit status 126
Errors were encountered while processing:
 samba4
E: Sub-process /usr/bin/dpkg returned an error code (1)

1 Answer 1

3

Please provide more information, such as the exact command you typed in Terminal to get that error.

First, let me include how to install Samba:

Open a Terminal Window (Ctrl+Alt+T ) and type each of these commands in:

sudo apt-get install samba samba-common
sudo apt-get install python-glade2
sudo apt-get install system-config-samba

The following commands will help you install Samba via the Terminal, install dependencies for the Configuration tool, and the graphical interface.

If the error is Permission denied, that means you did not run the command with elevated privileges. In other words, you need to run the same command you did to get the error, only put sudo in front of it. It will ask you for your password to confirm. When you do that, it should allow the command to run without errors. You should also purge (remove the package) with:

sudo apt-get purge samba samba-common

Then, rerun the commands.

7
  • I am running as root under (user) sudo su -. Aug 10, 2013 at 3:56
  • What command did you use to install Samba? Aug 10, 2013 at 3:59
  • apt-get install samba. tried the apt-get install samba samba-common and got the same results. the python-glade2 attempt resulted in this /var/lib/dpkg/info/samba4.postinst: 14: /var/lib/dpkg/info/samba4.postinst: /usr/share/samba/setoption.pl: Permission denied dpkg: error processing samba4 (--configure): subprocess installed post-installation script returned error exit status 126 Errors were encountered while processing: samba4 E: Sub-process /usr/bin/dpkg returned an error code (1) root@fileserver:~# Aug 10, 2013 at 4:06
  • system-config-samba subprocess installed post-installation script returned error exit status 126 Setting up libuser1 (1:0.56.9.dfsg.1-1.2ubuntu2) ... Setting up python-central (0.6.17ubuntu2) ... Setting up python-libuser (1:0.56.9.dfsg.1-1.2ubuntu2) ... Setting up system-config-samba (1.2.63-0ubuntu5) ... Processing triggers for libc-bin ... ldconfig deferred processing now taking place Processing triggers for python-support ... Processing triggers for python-central ... Errors were encountered while processing: samba4 E: Sub-process /usr/bin/dpkg returned an error code (1) Aug 10, 2013 at 4:13
  • Do not use sudo su. Just use sudo when necessary. sudo su is just bad practice. Type exit to exit out of sudo su and then use this: sudo apt-get purge samba4. After, run the commands posted in my answer. Aug 10, 2013 at 4:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .