LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-11-2014, 04:46 AM   #1
postcd
Member
 
Registered: Oct 2013
Posts: 527

Rep: Reputation: Disabled
Unhappy Permissions issue, i dont have them in gnome, but command line ok


Hi, i have

"sshfs" folder

Quote:
# stat sshfs
File: `sshfs'
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 15h/21d Inode: 1 Links: 1
Access: (0775/drwxrwxr-x) Uid: ( 1000/ amnesia) Gid: ( 0/ root)
Access: 2014-02-11 10:40:01.000000000 +0000
Modify: 2014-02-11 10:39:44.000000000 +0000
Change: 2014-02-11 10:39:44.000000000 +0000
and i create file called "d" (touch d)

-rw------- 1 amnesia root 0 Feb 11 10:39 d

then from gnome interface, i try to write some text into the file, but it tells me i dont have rights. my username is amnesia

but when i do:
echo "test" > d

from command line, data is written, whoami: amnesia

what i want to do is to be able to write into the newly created file in gnome interface, without everytime changing some permissions..

do i need to anyhow chown or chmod the sshfs folder, how please?

Last edited by postcd; 02-11-2014 at 04:48 AM.
 
Old 02-11-2014, 06:11 AM   #2
fuorviato
Member
 
Registered: Dec 2013
Location: Poland
Distribution: Sabayon/Gentoo 64bit
Posts: 215

Rep: Reputation: 14
Login as amnesia and check what groups is your account assigned to.

Quote:
fuorviatos@fuorviatos:~$ groups
fuorviatos adm cdrom sudo dip plugdev lpadmin sambashare jupiter
 
Old 02-11-2014, 06:21 AM   #3
postcd
Member
 
Registered: Oct 2013
Posts: 527

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by fuorviato View Post
Login as amnesia and check what groups is your account assigned to.
thx, it is like this...:
Code:
amnesia@amnesia:~$ whoami
amnesia
amnesia@amnesia:~$ groups
amnesia lp dialout cdrom floppy audio video plugdev lpadmin fuse scanner netdev vboxsf
 
Old 02-11-2014, 06:56 AM   #4
fuorviato
Member
 
Registered: Dec 2013
Location: Poland
Distribution: Sabayon/Gentoo 64bit
Posts: 215

Rep: Reputation: 14
It can be seen, you are issuing command in shell as root, so go figure why write permissions are allowed.
Type:
Quote:
ls -l sshfs
and paste its output here.
 
Old 02-11-2014, 08:22 AM   #5
postcd
Member
 
Registered: Oct 2013
Posts: 527

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by fuorviato View Post
It can be seen, you are issuing command in shell as root, so go figure why write permissions are allowed.
Type: and paste its output here.
thx, these are my private files so i obfuscate:

Quote:
amnesia@amnesia:~$ ls -l sshfs
total 2740
-rwxr-xr-x 1 amnesia root 319 Feb 11 10:19 ***.***
drwxrwxr-x 1 amnesia root 4096 Feb 11 14:14 browser***
-rw------- 1 amnesia root 5 Feb 11 10:42 d
drwxrwxr-x 1 amnesia root 4096 Feb 10 23:10 docs***
drwxrwxr-x 1 amnesia root 4096 Feb 8 14:17 docs***
-rw-r--r-- 1 amnesia root 93222 Feb 10 17:33 dropbox_1.6.0_i386.deb
drwxrwxr-x 1 amnesia root 4096 Feb 11 13:39 Hud***
drwxrwxr-x 1 amnesia root 12288 Feb 10 20:26 Obr***
-rwxr-xr-x 1 amnesia root 2671271 Feb 7 2012 truecrypt-7.1a-setup-x86
...
 
Old 02-11-2014, 08:48 AM   #6
fuorviato
Member
 
Registered: Dec 2013
Location: Poland
Distribution: Sabayon/Gentoo 64bit
Posts: 215

Rep: Reputation: 14
Go one level up from the sshfs directory and issue as root
Quote:
chown -R amnesia:amnesia sshfs/
.
This will make you owner of the directory, including sub-directories.
After this try to create there some files using GNOME.
Keep in mind that you won't open any file from the d directory as it has no execute permission.
If you wanna achieve that use chmod.
 
1 members found this post helpful.
Old 02-11-2014, 09:06 AM   #7
postcd
Member
 
Registered: Oct 2013
Posts: 527

Original Poster
Rep: Reputation: Disabled
thanks, i want to try, it i just have question, that folder is an mounted folder from remote server, it is folder of the "root" of that server, so should i really try changing amnesia:amnesia -R ?

im running that command now, its around 10 minutes, not ready yet, its like 400 files i hope :/
 
Old 02-11-2014, 09:33 AM   #8
postcd
Member
 
Registered: Oct 2013
Posts: 527

Original Poster
Rep: Reputation: Disabled
update: 703 files, 65 directories, 450MB of data , took around 15 minutes..

BUT NOT SOLVED

Editting&saving of the "d" file now works, but newly created file keeps old permissions (amnesia:root)

Quote:
amnesia@amnesia:~/sshfs$ ls -l kkk
-rw------- 1 amnesia root 0 Feb 11 15:27 kkk
Quote:
amnesia@amnesia:~/sshfs$ ls -l
...
-rw-r--r-- 1 amnesia amnesia 93222 Feb 10 17:33 dropbox_1.6.0_i386.deb
drwxrwxr-x 1 amnesia amnesia 4096 Feb 11 13:39 Hud***
-rw------- 1 amnesia root 0 Feb 11 15:27 kkk
drwxrwxr-x 1 amnesia amnesia 12288 Feb 10 20:26 Obr***
...
 
Old 02-11-2014, 09:34 AM   #9
fuorviato
Member
 
Registered: Dec 2013
Location: Poland
Distribution: Sabayon/Gentoo 64bit
Posts: 215

Rep: Reputation: 14
Quote:
Originally Posted by postcd View Post
thanks, i want to try, it i just have question, that folder is an mounted folder from remote server, it is folder of the "root" of that server, so should i really try changing amnesia:amnesia -R ?
Well, seeing that it's a network share, I'd rather not change that as it would allow anyone knowing your username password to access the files on the server.
Instead, do some singular chmoding on files that lack execute and read permissions.

Quote:
im running that command now, its around 10 minutes, not ready yet, its like 400 files i hope :/
The -R parameter affect everything under the main directory - that's the reason.
You can easily revert it, by
Quote:
chown -R amnesia:root sshfs/
.
 
Old 02-11-2014, 09:44 AM   #10
postcd
Member
 
Registered: Oct 2013
Posts: 527

Original Poster
Rep: Reputation: Disabled
this is new file created permissions

http://i.snag.gy/t0N5j.jpg

the permissions from terminal looks like:
-rw------- 1 amnesia root 0 Feb 11 15:27 new


---
This issue looks related (only its for Mac):
https://groups.google.com/forum/#!to...se/kQrb4cVu3jQ
(SSHFS and write permissions ?)

So i assume i cant fix these permissions to work properly, and its sshfs issue?

Last edited by postcd; 02-11-2014 at 09:50 AM.
 
Old 02-11-2014, 10:09 AM   #11
fuorviato
Member
 
Registered: Dec 2013
Location: Poland
Distribution: Sabayon/Gentoo 64bit
Posts: 215

Rep: Reputation: 14
Quote:
Originally Posted by postcd View Post
this is new file created permissions

http://i.snag.gy/t0N5j.jpg

the permissions from terminal looks like:
-rw------- 1 amnesia root 0 Feb 11 15:27 new
They look correct; The owner of each new file is amnesia and it gets read and write permissions. If different user is to operate on the files, he will need to be in "root" group. Isn't it fair enough for you?
 
Old 02-11-2014, 10:30 AM   #12
postcd
Member
 
Registered: Oct 2013
Posts: 527

Original Poster
Rep: Reputation: Disabled
Yes, only that i cant write into newly created file when working in GNOME interface.
-rw------- 1 amnesia root 0 Feb 11 15:27 new
 
Old 02-11-2014, 12:01 PM   #13
fuorviato
Member
 
Registered: Dec 2013
Location: Poland
Distribution: Sabayon/Gentoo 64bit
Posts: 215

Rep: Reputation: 14
You're right. What did you use to mount the share?
 
Old 02-12-2014, 03:51 AM   #14
taikedz
LQ Newbie
 
Registered: Jan 2014
Location: Scotland
Distribution: Manjaro, CentOS, OS X
Posts: 7

Rep: Reputation: Disabled
I might be a bit off here, but I'd say it sounds strange that your user's group is "root" and it does not have the "users" group in its group list...

If you create a file elsewhere via GNOME what are the permissions? (I'd like to see who GNOME is running as, and in what group). Are you logging into GNOME as "amnesia" as well?

When you start the terminal, did you `su` to being a different user?

And yes, what command did you use to mount that share?

(Also, what are you doing mounting the folder of your other server's root user folder?)
 
  


Reply

Tags
permissions



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
Is command line invocation of gnome-terminal to run more than one command possible? narnie Programming 4 02-17-2010 10:39 PM
Issue with line command in RHEL- 5 pramod.srk Linux - Newbie 2 11-10-2009 08:37 AM
Is there a way to see permissions by using the command line royeo Linux - General 2 05-30-2007 11:53 PM
Please dont kill me for asking.. Command line? (I AM i n00b) Nox_hand Linux - Newbie 17 09-17-2005 03:59 PM
Command line permissions Rawr101 Linux - General 4 10-16-2004 10:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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