Friday, July 12, 2013

vsftpd : 550 create directory operation failed

ftp error : 550 create directory operation failed 

Solution I : 
Disable SELinux. To see, how to disable it, Click here.

Solution  II :
If you do not want to disable SELinux. Follow this.
Run following commands.
# chcon -Rv --type user_home_dir_t /path/of/ftp/directory
OR
# chcon -t public_content_rw_t /path/of/ftp/directory # setsebool -P allow_ftpd_anon_write=1
Now restart vsftpd and try to reconnect again.

Solution  III :
If you are getting this error on ubuntu then the SELinux solution might not work for you because it is not installed by default on ubuntu.

Open vsftpd.conf and uncomment following line.

# write_enable=YES
Restart vsftpd.

Now try to connect but if you get following error

# 500 OOPS: vsftpd: refusing to run with writable root inside chroot()
Add this attribute in vsftpd.conf
# allow_writeable_chroot=YES
Restart vsftpd.

Now you should be able to create and remove directory/files using filezilla.

/usr/bin/env: php: No such file or directory

/usr/bin/env: php: No such file or directory

If you are getting this error, it means php is not installed or the file is corrupted.
Install it using
$ sudo apt-get install php5-cli
If you are still getting the error, Install all php packages using
$ sudo apt-get install php5 $ sudo apt-get install libapache2-mod-php5

Error: rpmdb open failed

YUM Error :  rpmdb open failed

To remove this error, Run these commands.

First clean up downloaded yum cache.
# yum clean all
Now remove all db files
# rm -f /var/lib/rpm/__db*
Rebuld the rpm database
# rpm --rebuilddb
Update yum
# yum update
OR
Method - II
# rm -f /var/lib/rpm/__db.[0-9][0-9]* # rpm --quiet -qa

If you get the error
rpmdb: write: 0xvendor-id, product-id: No space left on device
after running above commands. Check space in your filesystem.