Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have opened a Spreadsheet in Open office Calc. I minimize the calc window and try to delete the file from the file system, i am able to delete. In windows when we try to delete an in use file we get a message saying the file is in use.

Please let me know how do i fix this?

share|improve this question
In our environment multiple people work on the same calc spreadsheet. If i open the file and am working on it some one from the network deletes that file. I am under the impression that i have saved the file, hence i close it directly with out saving. Then end result my file is lost. – P. Srikant Jan 18 '11 at 10:14

UPDATE: see end of thsi answer for some infor on changing permissions:

I suspect you cannot prevent that delete in normal usage (without changing permissions)...

You can find a reasonable explanaion of how this works in the answer in this AskUbuntu Question .. I can continue playing a video after I Shift-Delete it.

There may be some special way to manually intervene and prevent this (by changing permissions), but in my experience ,having only recently moved to Ubuntu, I initially found this behaviour quite alarming (because it was so different to what I was used to)...

I now like this has some nice advantages once you know that it behaves like this...

UPDATE: An example of what you want is possible easily seen (and done) in the /tmp folder... You set read and write permissions to a group, so all members of that group can read and write... However, because the /tmp folder is owned by root (just another user)... and this other user has set the permission of the /tmp folder to 'sticky', only you (the owner) can delete files in /tmp

Here is a step by step example..

# To give a select group of users read/write/create access
#   to a specific directory (and its sub-directories)
# Fil deletion is only possible by the directory's owner, or by root.
# Members of the group can create sub-directories.

# create a primary user who will own the directory.
  sudo adduser pri_user

# create a group; for the exclusive use of this directory (+owner +root)
  sudo groupadd pri_group

# make the primary directory
  sudo mkdir /pri_dir

# set pri_dir's owner and group
  sudo chown pri_user:pri_group /pri_dir

# set pri_dir's permissions; the '1' is for the sticky bit.
  sudo chmod 1770 /pri_dir 

# create users 
  sudo adduser nodel1
  sudo adduser nodel2

# Add users to pri_group
  sudo usermod -aG pri_group nodel1
  sudo usermod -aG pri_group nodel2

# Note. For files to be accessible they must be given
# Read-and-Wrige permisson to group pri_group
share|improve this answer
+1, a very nice answer. But go easy on the formatting ;-) – Stefano Palazzo Jan 18 '11 at 12:47
@Stefano; By formatting I assume you mean't my obscession with bold and italics .. all (mostly) gone :) – Peter.O Jan 18 '11 at 16:02
It's perfect now. And even more informative – Stefano Palazzo Jan 18 '11 at 16:08

You can't. Don't delete files that you don't want deleted, whether someone else is working on them or not.

Disallowing concurrent access to a file was one of the more bone headed things Windows did early on to maintain compatibility with DOS, which had no concept of multiple programs running at once.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.