Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gyuricska Milán
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
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
Show 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):
...
@@ -322,13 +322,9 @@ def fbuffer(f, chunk_size=4096):
# Update users .ssh/authorized_keys
# Update users .ssh/authorized_keys
def
updateSSHAuthorizedKeys
(
username
,
key_list
):
def
updateSSHAuthorizedKeys
(
username
,
key_list
):
user_home_ssh
=
'/home/'
+
username
+
'/home/.ssh'
user_uid
=
getpwnam
(
username
)
.
pw_uid
user_uid
=
getpwnam
(
username
)
.
pw_uid
user_gid
=
getpwnam
(
username
)
.
pw_gid
user_gid
=
getpwnam
(
username
)
.
pw_gid
if
not
os
.
path
.
exists
(
user_home_ssh
):
auth_file_name
=
"/home/"
+
username
+
"/authorized_keys"
os
.
mkdir
(
user_home_ssh
,
0700
)
os
.
chown
(
user_home_ssh
,
user_uid
,
user_gid
)
auth_file_name
=
user_home_ssh
+
'/authorized_keys'
with
open
(
auth_file_name
,
'w'
)
as
auth_file
:
with
open
(
auth_file_name
,
'w'
)
as
auth_file
:
for
key
in
key_list
:
for
key
in
key_list
:
auth_file
.
write
(
key
+
'
\n
'
)
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