First time poster here, but very experienced Linux user.
But I've run into a really stupid problem I just can't get to the bottom of.
I create a new user (say fred), with a private share.
I ssh onto the box as user fred, and change to the "fred" directory.
Now if I go
echo "hello" > temp.tmp
all is fine.
And then, if I go
echo "hello again" >> temp.tmp
I get the error
-sh: cannot create temp.tmp: Permission denied
I've installed perl, and I wrote the following program.
#!/opt/bin/perl # print "open file\n" ; open FILE, ">test99.txt" or die $! ; print "about to write to file\n" ; print FILE "testing\n" ; close FILE ; print "open file and append\n" ; open FILE, ">>test99.txt" or die $! ; print "about to append to file\n" ; print FILE "testing\n" ; close FILE ;
And when I run that, I get
open file about to write to file open file and append Permission denied at ./testing.pl line 10.
I've installed bash, and I get the same problem.
I don't have the problem as root.
I don't have the problem if I write to the /tmp directory as a user or root.
I have the problem even if I create a subdirectory with permissions 777 - even with the sticky bit set (like /tmp).
I have the problem if I try to write to the /shares/Public directory, or in any directory under it. (That's where I first came across the problem.)
I'm completely puzzled. Any suggestions?