Wednesday, November 14, 2012

Vsftp error “500 OOPS: cannot change directory:/some/directory solved

yum install vsftpd

then start it by 


service vsftpd start

verify it's opened port(whether it's 21) by

netstat -tulpn | grep :21


go to system-> administration-> firewall and check the ftp

the firewall will be started and it will open the 21 port

Now the famous error "Vsftp error “500 OOPS: cannot change directory:/some/directory"

you can not log in with any local user

to solve it

[root@sun02 vsftpd]# getenforce


Enforcing


[root@sun02 vsftpd]# getsebool -a | grep ftp


allow_ftpd_anon_write –> off
allow_ftpd_full_access –> off
allow_ftpd_use_cifs –> off
allow_ftpd_use_nfs –> off
allow_tftp_anon_write –> off
ftp_home_dir –> on (change that to on in ur case this option is off)
ftpd_disable_trans –> off
ftpd_is_daemon –> on
httpd_enable_ftp_server –> off
tftpd_disable_trans –> off


[root@sun02 vsftpd]# setsebool -P ftp_home_dir on


setsebool command may not be found,it is in the /usr/sbin folder,create a softlink to /usr/bin

and you are done,restart vsftpd,the last command took a little time,that's all

source:http://blog.arithm.com/2009/06/15/defeating-vsftp-error-500-oops-cannot-change-directorysomedirectory/

Some irritating things solved when trying to compile c++ and java on Scientific Linux 6



Installed openjdk,java command working but javac command not found error

solved by

sudo yum install java-1.6.0-openjdk-devel

gcc installed but g++ command not found error

solved by

yum install gcc-c++

compiling a cpp file with g++ works find but code blocks shows an error with a return code from the gnome terminal 255

Solved by

yum install xterm

now run codeblocks from the terminal or application->programming-codeblocks

hope those works on Cent os or Fedora too

Sunday, November 11, 2012

Thursday, October 4, 2012

file * is better than ls -l,well sometimes

Yes file * will show all files with their types in the current directory,very useful sometimes.

Aptitude in Debian 5


dpkg -l shows all packages

dpkg -l | grep -i ssh will search for installed package ssh,the search will be case insentisitive

netstat -ntl | grep 22 will find the service that runs on 22 which is ssh

dpkg -L package name will show the contents of the package

dpkg -L openssh-client

when executing commnd such as dpkg -L openssh-client ,/usr/bin/scp will be shown in the results.so scp is a member package of openssh-client

if someone wants to find out which package belongs to which

dpkg -S /usr/bin/scp

will result in 

openssh-client

to install a package

dpkg - i packagename.deb

to remove a package

dpkg -r packagename.deb

to search for a package

aptitude search packagename

for example

aptitude search openssh

aptitude install packagename looks the /etc/apt/sources.list file and try to get the package from the resource specified there

aptitude remove packagename removes package

aptitude command take to interactive mode

search for package an + to mark it to be installed

press g to install