Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
bc6dd4ff
authored
Feb 08, 2013
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
store-server: Fixed permission issues
parent
7c5b5b95
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
5 deletions
+1
-5
miscellaneous/store-server/CloudStore.py
+1
-5
No files found.
miscellaneous/store-server/CloudStore.py
View file @
bc6dd4ff
...
...
@@ -322,13 +322,9 @@ def fbuffer(f, chunk_size=4096):
# Update users .ssh/authorized_keys
def
updateSSHAuthorizedKeys
(
username
,
key_list
):
user_home_ssh
=
'/home/'
+
username
+
'/home/.ssh'
user_uid
=
getpwnam
(
username
)
.
pw_uid
user_gid
=
getpwnam
(
username
)
.
pw_gid
if
not
os
.
path
.
exists
(
user_home_ssh
):
os
.
mkdir
(
user_home_ssh
,
0700
)
os
.
chown
(
user_home_ssh
,
user_uid
,
user_gid
)
auth_file_name
=
user_home_ssh
+
'/authorized_keys'
auth_file_name
=
"/home/"
+
username
+
"/authorized_keys"
with
open
(
auth_file_name
,
'w'
)
as
auth_file
:
for
key
in
key_list
:
auth_file
.
write
(
key
+
'
\n
'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment