Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This 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!


  Search this Thread
Old 09-15-2008, 09:55 AM   #1
LQ Newbie
Registered: Sep 2008
Posts: 1

Rep: Reputation: 0
moveing a file to other users.

Hello I am a DB2/DBA trying to set-up my first linux database. In order to get users access I need to move a profile to there accounts. I cannot seem to find the command to move a file from my useried to other userid's, or is there a palce I can put the profile file that all everyone can access when they logon? Any help would be appreicatr
Old 09-15-2008, 10:03 AM   #2
Senior Member
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
use the chown command.
type 'man chown' for more information.
If you want a single profile for every user, I suggest /etc
Check that your file is readable by anybody. Type 'man chmod' for more informations.

Last edited by Agrouf; 09-15-2008 at 10:04 AM.
Old 09-15-2008, 11:43 AM   #3
LQ 5k Club
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,087

Rep: Reputation: 407Reputation: 407Reputation: 407Reputation: 407Reputation: 407
/etc/skel is a possibly good place to put this sort of file.
See here:
You will need to be root to be allowed to copy the file there:

root@server# cp   /home/cdriskill/yourfile   /etc/skel
Make sure the file is owned by root:
root@server# chown  root:root  /etc/skel/yourfile
and not writeable by others:
root@server# chmod  644  /etc/skel/yourfile
Then they can copy it to their home directories like this:

user@server$ cp   /etc/skel/yourfile   ~
(they will then be able to edit their own copy, but not the master one in /etc/skel)

You cannot move a file from your home to another users home, because you do not have permission to do so. You have to do it as root, and then give them ownership of the file if you want them to be able to change it.

root@server# cp   /home/cdriskill/yourfile   /home/theirusername/
root@server# chown  theirusername:theirusername  /home/theirusername/yourfile
... and welcome to LQ!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Moveing 2000 small business exchange server to suse 10. Chrisww Linux - Server 0 08-30-2007 04:40 AM
Export all users to file pearsont74 Linux - General 3 09-13-2006 01:09 PM
log file for users rockwell_001 Linux - General 1 06-28-2004 02:04 PM
Are 2 users able to access the same file ForumKid Linux - General 5 09-20-2002 03:32 AM
Moveing up and need help Jedi_Cheese Linux - Software 1 01-20-2002 10:36 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:41 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration