LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-21-2013, 03:55 AM   #1
LuxLuv
Member
 
Registered: Feb 2007
Location: Sweden
Distribution: CentOS, Suse, Red Hat, OpenBSD, Solaris, Slackware
Posts: 40

Rep: Reputation: 15
Permissions when sending files between systems.


I have wiki running on my server. I have a friend that want to help me to change some files and he dont have any access to the server. So the soloution was to make a tar/gz of the whole wiki folder and send it to him so he can change and write to the files.

The question arrise later when he will re-pack (tar/gz) the folder again and send it back to me. How will the system react when some files have been modified on another system and no permission was preserved when doing the tarball? How should I take action when throwing in the new files so they adopt to the same permission structure as before? And If he creates a totally new file inside some folder that wasnt there before, how will this file be treated in my system?

/Lux
 
Old 05-21-2013, 02:05 PM   #2
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Quote:
Originally Posted by LuxLuv View Post
I have wiki running on my server. I have a friend that want to help me to change some files and he dont have any access to the server. So the soloution was to make a tar/gz of the whole wiki folder and send it to him so he can change and write to the files.
why not give him ssh access to the box?
Quote:

The question arrise later when he will re-pack (tar/gz) the folder again and send it back to me. How will the system react when some files have been modified on another system and no permission was preserved when doing the tarball?
IIRC when you untar the file it should do so with your users permissions. i could be wrong, but i think that is how it works.
Quote:

How should I take action when throwing in the new files so they adopt to the same permission structure as before? And If he creates a totally new file inside some folder that wasnt there before, how will this file be treated in my system?

/Lux
again see above.
 
Old 05-21-2013, 08:20 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
I'd untar it into a separate dir, and just copy up the changed files; he should have a list.
This way, the files will inherit the current settings.

You should definitely ensure you've got a backup before you do anything(!)
 
Old 05-27-2013, 03:00 AM   #4
yogesh_attarde
Member
 
Registered: Jan 2010
Posts: 82

Rep: Reputation: 1
I'd set the setgid advance permissions on the directory. So that any file created or copied in the directory will have the directory permissions.

To set setgid use any of the below command

#chmod g+s /path

OR

#chmod 2752 /path
Quote:
To set the setgid in the octal form, add a 2 before the three permission digits.

Regards,
Yogesh
 
  


Reply

Tags
folder, permissions, tar.gz



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
file systems, permissions and Samba andySMI Linux - Server 1 02-10-2012 06:58 AM
relation between programs permissions and permissions of the files they use rblampain Linux - Security 1 07-10-2011 08:40 PM
Problem in sending/receiving using sockets between two systems using IPv6 addresses btp10 Linux - Networking 1 03-08-2010 09:43 AM
Permissions for mounting file systems Tomás Ó hÉilidhe Linux - General 3 02-11-2009 07:34 PM
sending files den15 Linux - Newbie 8 12-21-2005 07:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:01 AM.

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