LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-12-2010, 10:28 AM   #1
corina.pelmus
LQ Newbie
 
Registered: Feb 2010
Location: Romania
Posts: 13

Rep: Reputation: 0
InfoBright created files' permissions issue.


Hello!

I have a NFS shared directory between two linux machines, one with RedHat3 and one with CentOS 5.4.

On the CentOS 5.4 machine I have InfoBright installed.
In that directory, I want to create files with InfoBright and then to select from them with MySQL on the RedHat3 machine.

The problem is that InfoBright creates files with 660 permissions and mysql with 666, and I cannot SELECT from any file due to the fact that is not "readable by all"(this is the actual error). I can change the permissions manually, but I need them to be created with 666 permissions, so that I can import them automatically on the other side with a script.

Is there any way to change the permissions of the InfoBright created files?

Thanks,
Corina
 
Old 05-13-2010, 09:14 PM   #2
kurwongbah
Member
 
Registered: Apr 2010
Posts: 82

Rep: Reputation: 24
This might help!

http://www.linuxquestions.org/questi...ia-nfs-214288/

You basically need to have the the server forcing the two clients to use the same UID/GID and they'll both will be able to access the files.

Alternatively (IF ALL ELSE FAILS!!!), you could do the permission change in the script using sudo...

BTW Redhat3 sounds ancient =)
 
Old 05-14-2010, 01:41 AM   #3
corina.pelmus
LQ Newbie
 
Registered: Feb 2010
Location: Romania
Posts: 13

Original Poster
Rep: Reputation: 0
Hello!

What you suggested is not working, it was one of the first things I tried.
It doesn't work if you create the same group with the same UID/gid on both machines.

Thank you for the tip anyway!

I solved it by changing the file's permissions from the mysql client before loading the data.

mysql> system chmod 666 /mnt/test.txt;
mysql> LOAD DATA INFILE '/mnt/test.txt'
-> INTO TABLE `test`.`dummy`
-> FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '`'
-> LINES TERMINATED BY '\n';
 
Old 05-14-2010, 06:14 PM   #4
kurwongbah
Member
 
Registered: Apr 2010
Posts: 82

Rep: Reputation: 24
Great that you were able to solve it.
For the record: You should tell the NFS server to force client connections to use the same uid/gid, not the clients.
That way they should be able to access each others files.
 
  


Reply



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
Applying default permissions for newly created files within a specific folder mattydee Linux - Desktop 29 10-30-2016 09:55 PM
permissions of files created by rsync from windows share txm123 Linux - Newbie 2 08-28-2009 04:25 PM
Automatically set permissions of new files created within a specific folder Lorian Linux - Desktop 2 03-03-2007 03:17 PM
permissions for newly created files dialbat Linux - General 2 10-04-2004 02:58 PM
How to permanently set permissions on all files created in a directory? BrianK Linux - General 8 06-24-2004 04:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:05 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