1756997 Members
2274 Online
108858 Solutions
New Discussion юеВ

Can't save a file

 
Jake Posey_1
Occasional Advisor

Can't save a file

After editing the /etc/fstab file and attemping to save the file I get "Can't open file for writing". The editor I'm using is vi. I can create a file in /tmp but I cannot in /. I ran into this before but don't remember the fix beside rebooting.

Thanks,
Jake
6 REPLIES 6
Himanshu_3
Valued Contributor

Re: Can't save a file

Hi Jake,

Check the permissions of files and folders , to me it primarily looks to be a permissions issue.

Cheers,
Himanshu
Jake Posey_1
Occasional Advisor

Re: Can't save a file

That's not the case. The permissions are 644 and I'm logged on as root. It thinks / is mounted as a read only file system. That is not the case.

Thanks
Mel Burslan
Honored Contributor

Re: Can't save a file

are you sure your /var/tmp is not full. vi saves the transient file at this location not /tmp.

________________________________
UNIX because I majored in cryptology...
V. Nyga
Honored Contributor

Re: Can't save a file

Hi,

only thing I could imagine - are you rlogged in?

Volkmar
*** Say 'Thanks' with Kudos ***
Muthukumar_5
Honored Contributor

Re: Can't save a file

I hope file system /var may be full. Check with bdf statistics. It will give you the correct answer to your problem.

hth.
Easy to suggest when don't know about the problem!
RAC_1
Honored Contributor

Re: Can't save a file

check perms on following files/dirs.

/etc
/etc/fstab
/
/var/
/var/tmp
/tmp

Any of these file systems full??
There is no substitute to HARDWORK