Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Could anybody help me create a script that moves the files and directory from the user home directory to /usr/local/. this should get executed when the user logout.point me to a similar one I can modify, or indeed write one for me a script that will move files when user logout.
That isn't what /usr/local is for. Why do you want to move a users files? The /home directory is the place for a regular users files. /usr/local is where programs you build yourself often gets installed. It has a similar hierarchy structure as the the root directory and /usr.
No the server is located remotely. l have to update the remote server web applications so the programmer has to upload the to user's home directory so that i can able to get the file's eventually files copied through script when user's get logout.if there is any other idea plz specify me
If the shell used is bash, then if there is a ~/.bash_logout script, it will be run. This script won't have write permission to /usr/local, so you might want to create a directory in /home/ just for storing the files.
See the info bash manual. The ~/.bash_logout is run when an interactive shell is exited. That is what the login shell is. However a user might be using a different shell.
ya the plan of running script is not possible unless i gave full permission to access /usr/local is there any other way so that i can place upload file to that directory.please help me solve this situation.
Gives us some more details. Also it is very easy to move the files provided user have permission to do so, but this way you will end up having very insecure application, which is updated arbitrarily with out testing.
There are couple of methods for the job you are looking for
As jschiwal said, it can be done through .bash_logout
Another way is to have cronjob which runs every minute, run by a user who has permission to both folders - source and destination
In case if it is an development environment; then probably you need a SVN or CVS server, a staging server - for testing, and then the production server.
Hello guys,
Here the my requirements:
i have to secure my ssh for remote login.so i have blocked the remote login and allowed a user to login in remote and from there using sudo command changing to root user. Now the problem is the programmer have to update the web applications (java runs in tomcat ) so he uses the graphical ssh to upload the files but here the files are stored in the user's home directory. so those files has to be 'moved' to the /usr/local where the jakarta folder when the logout. then the higher offical can able to use those files for deploying in live server. but every time the user uploads and logs out the above scenario has to be processed.
If any further lockout information mention it and help me.
i haven't tried with those sudoers thank you for idea and the new things i am going to work. If you helped me to study those things i can proceed to do things with you help.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.