Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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)
share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

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.

share|improve this answer
    
I am running as root under (user) sudo su -. –  Todd Burnheimer Aug 10 '13 at 3:56
    
What command did you use to install Samba? –  sameetandpotatoes Aug 10 '13 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:~# –  Todd Burnheimer Aug 10 '13 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) –  Todd Burnheimer Aug 10 '13 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. –  sameetandpotatoes Aug 10 '13 at 4:22
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.