LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 11-09-2011, 12:56 AM   #1
jamieb22
LQ Newbie
 
Registered: Nov 2011
Posts: 2

Rep: Reputation: Disabled
NAS Mount Point Permission Issue?


Hi

I have an application that archives documents to an external mount point. The mount point references a location on a external NAS. The problem I have is that occasionally the connection to the NAS is lost. When this happens, the applications archives documents to local directory where the NAS is mounted. Due to this behaviour, there are now documents archive both locally and remotely. This is not my intention. When the mount point is disconnected, the desired behavior is for Linux to report to the application it does not have sufficient privileges to write to the local directory and its sub-directories. Only when the mount point is connected, should the application have write permissions. Currently the application is running under the ROOT account. I thought about marking the local directory as read only to prevent data from being written locally, but this doesn't seem to help. Are the permissions of the directory changed when the NAS is mounted? Are there any recommendations on how to prevent an application from writing to the local mount directory when a mount point is disconnected?

Many thanks

Jamie
 
Old 11-09-2011, 01:58 AM   #2
jamieb22
LQ Newbie
 
Registered: Nov 2011
Posts: 2

Original Poster
Rep: Reputation: Disabled
Answer

I am going to answer my own question here:

1) create the directory mnt/store1
2) Execute "chattr +i /mnt/store1" (this sets the immutable flag so that even the ROOT account cannot write)
3) Mount the external NAS to /mnt/store1
 
  


Reply


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
Fuse mount point - Permission Denied sethusubbiah Linux - Newbie 0 07-30-2010 10:13 AM
Trouble mounting ipod. Hal issue and mount point issue. okos Slackware 2 05-10-2009 11:51 PM
puppy+grub saves ram installed mount point as HD install mount point agualust Linux - Newbie 0 04-10-2009 11:23 AM
show the permission of '/usr' mount point in AIX 5.3 shipon_97 AIX 1 11-19-2008 06:51 AM


All times are GMT -5. The time now is 11:54 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration