[Cialug] Need assistance with chown and find commands

Kelly Slaugh kelly at visionary.com
Fri Dec 20 12:17:24 CST 2013


"BTW I'm curious why running this command is necessary.  Why not fix the software creating files under the wrong user?" Nicoli

The reason for this command is because we have two different OS's running in the office.  OS X and Windows, Adobe Photoshop creates an issue with Permissions when a Mac user creates a file.  Only Mac users can open the file from the server and modify and save changes.  If a Windows user creates an image file the Mac users cannot save any modifications to that file directly to the server.  The Mac users have to copy the file to their desktop, modify, save, and then delete the old file because they don't have write permissions to replace the existing file.  The same is for PC users when a file is created by a Mac user.  

This is a known issue with Adobe and their work around doesn't work because it's PC specific not a Global fix on the server.  I attempted the work around on the Mac, (Adobe says it's because of Samba) however nothing has changed.  The Work around didn't work.  The next attempted fix is this solution.  Running a cron job nightly to find all of the files that the Mac user (userA) has created and chown those files to a PC user (UserB).  The Mac user won't need access to these files again after they are created however PC users do, so this fix would be right for our environment.  And if the Mac user does need access, then they have to copy the file to their desktop and create a new one.  Which the nightly cron job will take care of the permissions.  

I've also thought of changing the permissions inside of fstab to try and force the gid permissions.  This failed as well because it's not a server problem.  The Problem is with the Mac's & Adobe.  The gid=grpA,mode=664 didn't work.

I'm up for ideas if someone has a better solution.

Thank you for the read and I appreciate all the help.

Kelly L. Slaugh // Systems Administrator

-----Original Message-----
From: cialug-bounces at cialug.org [mailto:cialug-bounces at cialug.org] On Behalf Of cialug-request at cialug.org
Sent: Friday, December 20, 2013 12:00 PM
To: cialug at cialug.org
Subject: Cialug Digest, Vol 104, Issue 18

Send Cialug mailing list submissions to
	cialug at cialug.org

To subscribe or unsubscribe via the World Wide Web, visit
	http://cialug.org/mailman/listinfo/cialug
or, via email, send a message with subject or body 'help' to
	cialug-request at cialug.org

You can reach the person managing the list at
	cialug-owner at cialug.org

When replying, please edit your Subject line so it is more specific than "Re: Contents of Cialug digest..."


Today's Topics:

   1. Re: Need assistance with chown and find commands (Dave Weis)
   2. Re: Need assistance with chown and find commands (Nicolai)
   3. Re: Need assistance with chown and find commands (Dave Weis)
   4. Re: vm on top of xen? (jim kraai)


----------------------------------------------------------------------

Message: 1
Date: Thu, 19 Dec 2013 14:01:05 -0600
From: Dave Weis <djweis at sjdjweis.com>
To: Central Iowa Linux Users Group <cialug at cialug.org>
Subject: Re: [Cialug] Need assistance with chown and find commands
Message-ID: <r06mpith2dch8alvdcw2jii8.1387483265588 at email.android.com>
Content-Type: text/plain; charset=utf-8

Your way was dangerous because it didn't sanitize the arguments. I could create a filename of?
whatever ; rm -rf /
And clean your system or at least files you have permission to erase if not root.





-------- Original message --------
From: Tim McLaughlin <timothy.r.mclaughlin at gmail.com>
Date:12/19/2013  1:22 PM  (GMT-06:00)
To: Central Iowa Linux Users Group <cialug at cialug.org>
Subject: Re: [Cialug] Need assistance with chown and find commands 

I was trying to give some options and for the specifics to be figured out.
no one learns anything with cut and paste, and its only fun if you are learning something new.

--Tim



On Thu, Dec 19, 2013 at 1:12 PM, Paul Gray <gray at cs.uni.edu> wrote:

> On 12/19/2013 01:10 PM, Paul Gray wrote:
>
>? find . - -user userA -exec chown userB {} \;
>>
>????????? ^ Typo.? No extra dash
>
> find . -userA -exec chown userB {} \;
>
> -PG
>
>
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
>
_______________________________________________
Cialug mailing list
Cialug at cialug.org
http://cialug.org/mailman/listinfo/cialug

------------------------------

Message: 2
Date: Thu, 19 Dec 2013 14:05:14 -0600
From: Nicolai <nicolai-cialug at chocolatine.org>
To: Central Iowa Linux Users Group <cialug at cialug.org>
Subject: Re: [Cialug] Need assistance with chown and find commands
Message-ID: <20131219200514.GA20798 at vectra.student.iastate.edu>
Content-Type: text/plain; charset=us-ascii

On Thu, Dec 19, 2013 at 02:01:05PM -0600, Dave Weis wrote:
> Your way was dangerous because it didn't sanitize the arguments.

This is why people should use something like

find . -user bob -print0 | xargs -0 chown alice:alice

if they have to pass output of find to something else.

BTW I'm curious why running this command is necessary.  Why not fix the software creating files under the wrong user?

Nicolai


------------------------------

Message: 3
Date: Thu, 19 Dec 2013 14:17:39 -0600
From: Dave Weis <djweis at sjdjweis.com>
To: Central Iowa Linux Users Group <cialug at cialug.org>
Subject: Re: [Cialug] Need assistance with chown and find commands
Message-ID:
	<CAENx1Ovu5W=OrU6nt2XQ4EPgxdVk6rdwZp7TwpRDuxM4LtKPrg at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

The reason people don't fix the software:

A young woman was preparing a ham dinner. After she cut off the end of the ham, she placed it in a pan for baking.

Her friend asked her,"Why did you cut off the end of the ham"?

And she replied ,"I really don't know but my mother always did, so I thought you were supposed to."

Later when talking to her mother she asked her why she cut off the end of the ham before baking it, and her mother replied, "I really don't know, but that's the way my mom always did it."

A few weeks later while visiting her grandmother, the young woman asked, "Grandma, why is it that you cut off the end of a ham before you bake it?"

Her grandmother replied, "Well dear, otherwise it would never fit into my baking pan."



On Thu, Dec 19, 2013 at 2:05 PM, Nicolai <nicolai-cialug at chocolatine.org>wrote:

> On Thu, Dec 19, 2013 at 02:01:05PM -0600, Dave Weis wrote:
> > Your way was dangerous because it didn't sanitize the arguments.
>
> This is why people should use something like
>
> find . -user bob -print0 | xargs -0 chown alice:alice
>
> if they have to pass output of find to something else.
>
> BTW I'm curious why running this command is necessary.  Why not fix 
> the software creating files under the wrong user?
>
> Nicolai
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
>


------------------------------

Message: 4
Date: Thu, 19 Dec 2013 21:03:11 -0600
From: jim kraai <jimgkraai at gmail.com>
To: Central Iowa Linux Users Group <cialug at cialug.org>
Subject: Re: [Cialug] vm on top of xen?
Message-ID:
	<CANoA21CjK8stc3o-PxzrnYoGKjUDmTEtBHGffXfAn=YLV6XXuw at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

i forgot to say, "thank you" for the great answers

Thank you!

Seriously.

--jim



On Fri, Oct 4, 2013 at 2:47 PM, Theron Conrey <theron at conrey.org> wrote:

> These days I try and steer folks towards containers on VMs rather than 
> nested.  Unless you actually need full VM isolation for something 
> crazy, container level isolation has less load, and doesn't cost as 
> much in terms of performance.
>
> Plus.. it's cool.
>
> -theron
>
>
> On Fri, Oct 4, 2013 at 11:35 AM, jim kraai <jimgkraai at gmail.com> wrote:
>
>> You guys are awesome
>>  On Oct 4, 2013 12:23 PM, "Matt Stanton" <matt at itwannabe.com> wrote:
>>
>>   Yeah, Linode doesn't expose virtualization instructions to their guests.
>>>   Interestingly enough, though, DigitalOcean does (vmx).  The 
>>> problem with  DigitalOcean is that they do not allow you to choose 
>>> your bootloader...
>>>  their hypervisor (they use KVM) specifies the kernel image to boot 
>>> and acts  as bootloader itself.  You have to choose one of a couple 
>>> of possible  options for kernel images given the distro you chose to 
>>> install, which  means you don't even get to do your own kernel 
>>> configurations or security  updates.  I would imagine that this 
>>> precludes using xen or kvm inside your  VPS (though vbox might 
>>> work?).  You would, of course, have to choose a  decent VPS with 
>>> enough virtual cpus to be able to distribute some to your  nested 
>>> VMs.
>>>
>>>  -- Matt (N0BOX)
>>>
>>>  Sent from my ASUS Transformer
>>>
>>>  -----Original Message-----
>>>  From: "Daniel A. Ramaley" <daniel.ramaley at drake.edu>
>>>  To: cialug at cialug.org
>>>  Sent: Fri, 04 Oct 2013 11:44 AM
>>>  Subject: Re: [Cialug] vm on top of xen?
>>>
>>>  I believe what you are asking for is called "nested virtualization".
>>>
>>>  Generally it is not supported because the base virtualization layer  
>>> (Xen, in your case) does not pass the virtualization extensions to 
>>> the  guest. Run this in your guest, and if you get any output then 
>>> hardware  virtualization will work, but if not, then it won't:
>>>      $ egrep 'vmx|svm' /proc/cpuinfo  Note that that command is 
>>> Linux-specific; what you are really searching  for are whether 
>>> virtualization extensions of the CPU are exposed to the  guest OS.
>>>
>>>  If you *really* want to do nested virtualization, it might be 
>>> possible  with some restrictions about what guest operating systems you can run.
>>>  To learn more, i recommend search terms like these (i got results 
>>> from  Google that seemed applicable):
>>>      xen without hardware virtualization
>>>      virtualbox without hardware virtualization
>>>      xen paravirtualization
>>>
>>>
>>>  On 2013-10-04 at 11:24:53 jim kraai wrote:
>>>  > can I run xen on xen or vbox on xen?
>>>  >
>>>  > wanting to fiddle with craziness on a linode vps  > 
>>> _______________________________________________
>>>  > Cialug mailing list
>>>  > Cialug at cialug.org
>>>  > http://cialug.org/mailman/listinfo/cialug
>>>  __
>>>  Daniel A. Ramaley
>>>  Network Engineer 2
>>>
>>>  Dial Center 112, Drake University
>>>  2407 Carpenter Ave / Des Moines IA 50311 USA
>>>  Tel: +1 515 271-4540
>>>  Fax: +1 515 271-1938
>>>  E-mail: daniel.ramaley at drake.edu
>>>
>>>  _______________________________________________
>>>  Cialug mailing list
>>>  Cialug at cialug.org
>>>  http://cialug.org/mailman/listinfo/cialug
>>>  _______________________________________________
>>>  Cialug mailing list
>>>  Cialug at cialug.org
>>>  http://cialug.org/mailman/listinfo/cialug
>>>
>>>
>>>  _______________________________________________
>> Cialug mailing list
>> Cialug at cialug.org
>> http://cialug.org/mailman/listinfo/cialug
>>
>>  _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
>


------------------------------

_______________________________________________
Cialug mailing list
Cialug at cialug.org
http://cialug.org/mailman/listinfo/cialug


End of Cialug Digest, Vol 104, Issue 18
***************************************


More information about the Cialug mailing list